www.icetips.com  Icetips Utilities Documentation 11/14/2010    

File Class: GetDriveType

Previous  Top  Next  


Prototype: (String pDrive),Long

 

pDriveDrive letter to get the drive type for.  Normally passed as C:\

 

ReturnsReturns 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:

EnumLocalDrives

GetDriveTypeString

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getdrivetype_fileclass.htm