Volume
From REALbasicWiki
Contents |
[edit] Prototype
Function Volume( volumeNumber as Integer ) As FolderItem
[edit] Description
The Volume function returns a FolderItem that represents the mounted volume whose number is volumeNumber. This function can be used in conjunction with the VolumeCount function to loop through the volumes currently mounted by the Operating System.
[edit] Discussion
[edit] Sample Code
This code displays the names of all the mounted volumes.
Dim i,maxI as Integer
Dim msg as String
dim f as FolderItem
maxI = VolumeCount-1
For i = 0 to maxI
f = Volume( i )
if not ( f is nil ) then
msg = msg + f.Name + EndOfLine
end if
Next
msgBox msg
