|
Previous Top Next |
Prototype: | (String pDrive),Long |
pDrive | Drive letter to get the drive type for. Normally passed as C:\ |
Returns | Returns the drive type |
This method returns an integer drive type for the specified drive. The value can be one of the following:
Value |
Meaning |
IT_DRIVE_UNKNOWN |
The drive type cannot be determined. |
IT_DRIVE_NO_ROOT_DIR |
The root path is invalid, for example, no volume is mounted at the path. |
IT_DRIVE_REMOVABLE |
The drive is a type that has removable media, for example, a floppy drive or removable hard disk. |
IT_DRIVE_FIXED |
The drive is a type that cannot be removed, for example, a fixed hard drive. |
IT_DRIVE_REMOTE |
The drive is a remote (network) drive. |
IT_DRIVE_CDROM |
The drive is a CD-ROM drive. |
IT_DRIVE_RAMDISK |
The drive is a RAM disk. |
To get a text description of each type use the GetDriveTypeString method.
Example:
ITF ITFileClass
I Long
ITF.EnumLocalDrives()
Loop I = 1 To Records(ITF.LocalDrives)
Get(ITF.LocalDrives,I)
ITF.ODS('Drive: ' & Clip(ITF.LocalDrives.RootPath) &|
', Type = ' & ITF.LocalDrives.DriveType &|
': ' & ITF.GetDriveTypeString(ITF.LocalDrives.RootPath))
End
See also: