Shell.GetDiskFreeSpace |
Top Previous Next |
Returns the available space for the given disk.
Syntax function Shell.GetDiskFreeSpace(DirName: string): largeinteger
Alternative Names
Description Returns the number of bytes available on the specified disk or directory.
DirName is a local disk or directory, this can be a UNC name. If the value is a UNC name, it must include a trailing backslash, eg "\\MyServer\MyShare\".
The Return Value is the number of free bytes for the given disk, or NULL in case of an error, use GetLastError or GetLastErrorMessage to return error information.
See Also
Example execute UDSBlock returns (nr_of_free_bytes int64) as begin /* returns number of free bytes */ suspend;
/* shows error message if 'a:' does not exist */ nr_of_free_bytes = Shell.GetDiskFreeSpace('a:\'); if (nr_of_free_bytes is null) then GUI.ShowMessage(Shell.GetLastErrorMessage()); end |