Obtains the drive type for a volume
Usage:
sysDriveType (object me, string driveChar)
Parameters:
driveChar ( string ) - the volume character
Returns:
(integer) - the type of drive registered with windows. The possible return values are:
- Drive unknown
- Drive is not a volume
- Removable
- Fixed
- Remote
- CD Rom
- Ram Disk
Example:
-- example shows how to find the CD Drive
-- It then tries to launch projector if the proper CD is in the Drive
xtRose = xtra("Rosetta").new( )
Repeat with i = 99 to 122
strDriveLetter = numToChar(i)
If( xtRose.sysDriveType( strDriveLetter) = 6 ) Then
-- check if our director projector is in the CD Drive
If ( xtRose.sysFileExist( strDriveLetter & ":\projector.exe" ) ) Then
return xtRose.sysExecute( "open", strDriveLetter & ":\projector.exe", EMPTY, 5 )
End If
End If
End Repeat
Notes:
If the parameter for driveChar is more than 1 character, only the 1st character will be read by Rosetta.