Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

DiskSize

Return the total amount of diskspace.

Declaration

Source position: diskh.inc line 18

function DiskSize(

  drive: Byte

):Int64;

Description

DiskSize returns the size (in bytes) of 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: Under Linux, and Unix in general, the concept of disk is different than the dos one, since the file system is seen as one big directory tree. For this reason, the DiskFree and DiskSize functions must be mimicked using filenames that reside on the partitions. For more information, see AddDisk

For an example, see DiskFree.

Errors

On error, -1 is returned.

See also

DiskFree

  

Return the amount of free diskspace.

AddDisk

  

Add a disk to the list of known disks (Unix only).


Documentation generated on: Dec 27 2024