Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining Cluster Size Reliably
Message
From
25/10/2000 05:57:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/10/2000 05:24:53
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00433935
Message ID:
00433939
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform