GetFreeDiskSpace()

  GetFreeDiskSpace

Description

GetFreeDiskSpace() is used to retrieve the number of bytes of free disk space on the file system containing the passed file or directory.

Call Signature

double GetFreeDiskSpace ( string drive_spec )

Return Value

double

The number of bytes of free diskspace. -1 is returned on systems where this capability is not supported, or if the passed file or directory does not exist.

Argument

string drive_spec:

A string expression naming a file or directory on the drive for which we want information. Use "." to refer to the current drive.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.