Previous - sysFolderSpecial Section Home - File System Next - sysDriveSize


sysDriveType ( )

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:

  1. Drive unknown
  2. Drive is not a volume
  3. Removable
  4. Fixed
  5. Remote
  6. CD Rom
  7. 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.


Previous - sysFolderSpecial Section Home - File System Next - sysDriveSize