Function DiskSpace() Foundation
Determines the storage space available on a drive.
DiskSpace( [<cDrive>] ) --> nBytes
DiskSpace() returns an integer numeric value indicating the available storage space on the specified drive in bytes. If the operating system cannot access the specified drive, a runtime error is generated.
Under an early Windows 95 version (prior to the OSR 2 release) the return value may be incorrect for disk partitions of more than 2 gigabytes.
The environment function DiskSpace() determines the free storage capacity on a disk drive. It is often used with routines that copy data from a hard disk to a diskette. The size of the files to be copied can be determined with the function Directory() or the low level file functions FOpen() and FSeek(). When DBF files are to be copied, their size can also be determined using the functions RecSize() and LastRec().
DiskSpace() does not use the drive setting specified with SET DEFAULT.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.