DiskFree¶
Return the amount of free diskspace.
Description¶
DiskFree returns the free space (in bytes) on disk Drive. Drive is the number of the disk drive:
- 0
- for the current drive.
- 1
- for the first floppy drive.
- 2
- for the second floppy drive.
- 3
- for the first hard-disk partition.
- 4-26
- for all other drives and partitions.
Remark:
Errors¶
On error, -1 is returned.
See also¶
| Name | Description |
|---|---|
| DiskSize | Return the total amount of diskspace. |
| AddDisk | Add a disk to the list of known disks (Unix only). |
Example¶
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.