Classes TDriveUnit
, TDriveInfo
and
TVolumeInfo
encapsulate drive and volume information. Drive and
volume information both include the attributes of the drive and the media
mounted on it. The volume has additional information including the amount of
free space on the media and its size.
A unit is a device which may or may not have a drive in it. For removable media, the unit is always present, but a drive may not be.
A drive may have from one to four partitions on it. Each partition represents a volume. The volume may or may not be formatted.
A maximum of 26 drives are available and they may be represented by
letters (A
to Z
), or by numbers (0 to 25). To find
which drives are available, use RFs::DriveList()
to get the drive
list. A TDriveList
is an array of 26 bytes. Drive A
has value 0, B
= 1 etc. Any byte in the drive
list which has a non zero value signifies that the
corresponding drive exists. The byte's value can be used to retrieve the
drive's attributes by using a bitwise AND with the corresponding drive
attribute constant.
RFs::Drive()
may also be used to get drive
attributes.
Class RFormat
allows a drive to be formatted in a series
of steps. RRawDisk
allows a disk’s data to be accessed in
raw mode.