xHarbour Reference Documentation > Function Reference |
Determines the type of a drive.
DriveType( [<cDrive>] ) --> nDriveType
The function returns a numeric value indicating the type of the specified drive. The following values are possible:
Codes for drive types
Return | Drive type |
---|---|
0 | RAM drive |
2 | Floppy drive |
3 | Hard drive |
4 | CD-Rom drive |
5 | Network drive |
9 | Unknown drive |
See also: | DiskName() |
Category: | CT:DiskUtil , Disks and Drives |
Source: | ct\disk.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example lists the types of 26 possible drives and their capacity PROCEDURE Main LOCAL cDrive, i CLS FOR i:=1 TO 26 cDrive := Chr(64+i) ? cDrive, DriveType( cDrive), DiskTotal( cDrive ) NEXT RETURN
http://www.xHarbour.com