home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / fscommand / Xtras / FileXtra4_test.dir / 00012_Script_VolumeTests() < prev    next >
Text File  |  2002-12-20  |  2KB  |  46 lines

  1. on VolumeTests
  2.   WriteInfo(RETURN & "Volume Tests commencing")
  3.   WriteInfo("******************************************")
  4.   
  5.   fxObj = xtra("FileXtra4").new()
  6.   if not(objectP(fxObj)) then
  7.     WriteInfo("*** Could not instantiate FileXtra4.  Is it in the Xtras folder? ***" & RETURN)
  8.     return
  9.   end if
  10.   
  11.   volumeList = fxObj.fx_VolumesToList()
  12.   WriteInfo("fx_VolumesToList returned the following volumes:")
  13.   repeat with i = 1 to volumeList.count
  14.     WriteInfo("     " & volumeList.getAt(i))
  15.   end repeat
  16.   
  17.   WriteInfo("")       -- blank line
  18.   
  19.   repeat with i = 1 to volumeList.count
  20.     retVal = fxObj.fx_VolumeExists(volumeList.getAt(i))
  21.     WriteInfo(volumeList.getAt(i))
  22.     WriteInfo("     fx_VolumeExists('" & volumeList.getAt(i) & "') returns " & GetTrueFalseString(retVal))
  23.     WriteInfo("          fx_ErrorNumber returns " & fxObj.fx_ErrorNumber() & ", fx_ErrorString returns '" & fxObj.fx_ErrorString() & "'")
  24.     
  25.     retVal = fxObj.fx_VolumeIsRemovable(volumeList.getAt(i))
  26.     WriteInfo("     fx_VolumeIsRemovable('" & volumeList.getAt(i) & "') returns " & GetTrueFalseString(retVal))
  27.     WriteInfo("          fx_ErrorNumber returns " & fxObj.fx_ErrorNumber() & ", fx_ErrorString returns '" & fxObj.fx_ErrorString() & "'")
  28.     
  29.     retVal = fxObj.fx_VolumeIsCDROM(volumeList.getAt(i))
  30.     WriteInfo("     fx_VolumeIsCDROM('" & volumeList.getAt(i) & "') returns " & GetTrueFalseString(retVal))
  31.     WriteInfo("          fx_ErrorNumber returns " & fxObj.fx_ErrorNumber() & ", fx_ErrorString returns '" & fxObj.fx_ErrorString() & "'")
  32.     
  33.     totBytes = fxObj.fx_VolumeGetTotalBytes(volumeList.getAt(i))
  34.     WriteInfo("     fx_VolumeGetTotalBytes('" & volumeList.getAt(i) & "') returns " & totBytes)
  35.     WriteInfo("          fx_ErrorNumber returns " & fxObj.fx_ErrorNumber() & ", fx_ErrorString returns '" & fxObj.fx_ErrorString() & "'")
  36.     
  37.     freeBytes = fxObj.fx_VolumeGetFreeBytes(volumeList.getAt(i))
  38.     WriteInfo("     fx_VolumeGetFreeBytes('" & volumeList.getAt(i) & "') returns " & freeBytes)
  39.     WriteInfo("          fx_ErrorNumber returns " & fxObj.fx_ErrorNumber() & ", fx_ErrorString returns '" & fxObj.fx_ErrorString() & "'")
  40.     
  41.     WriteInfo("")
  42.   end repeat
  43.   
  44.   fxObj = 0
  45. end
  46.