Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining Cluster Size Reliably
Message
De
25/10/2000 05:57:41
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/10/2000 05:24:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00433935
Message ID:
00433939
Vues:
27
>Hi All,
>
>Can anyone tell me an elagent way of determining the cluster size
>of a specified drive (e.g. C:, D:, E: etc) reliably for drives which
>may be larger than 2GB. The GetDiskFreeSpace API function returns
>unreliable results (e.g. my C: drive is actually 4K clusters but it
>returns 32K!!!).
>
>I am using the cluster size to determine disk space requirements prior
>to backing up some DBF/DBC files and would like it to be correct.
>
>I can fudge my way around it by creating a file with a size of 1 byte and
>record the free space before and after to determine the cluster size, but I
>*HATE* this approach. :=((
>
>There must be a reliable way to do it with an API call. Can anyone help please?
>
>Many thanks,
>
>
>Paul Parrish

Paul,
If just free space you could use diskspace(). There is GetDisFreeSpaceEx() now but I never used it (needs 64 bits integer).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform