[Overview][Constants][Types][Classes][Procedures and functions][Variables] |
Return the amount of free diskspace
Source position: diskh.inc line 16
function DiskFree( |
drive: Byte |
):Int64; |
DiskFreereturns the free space (in bytes) on disk Drive. Drive is the number of the disk drive:
Remark: | Under linux, and Unix in general, the concept of disk is different than the dos one, since the filesystem is seen as one big directory tree. For this reason, the DiskFreeand DiskSizefunctions must be mimicked using filenames that reside on the partitions. For more information, see AddDisk. |
On error, -1is returned.
|
Return the total amount of diskspace. |
|
|
Add a disk to the list of known disks (Unix only) |
Program Example27; { This program demonstrates the DiskFree function } Uses sysutils; Begin Write ('Size of current disk : ',DiskSize(0)); Writeln (' (= ',DiskSize(0) div 1024,'k)'); Write ('Free space of current disk : ',Diskfree(0)); Writeln (' (= ',Diskfree(0) div 1024,'k)'); End.