Difference between revisions of "Volume"

From Xojo Documentation

m (Text replacement - "{{Deprecated|" to "{{DeprecatedItem|")
 
Line 1: Line 1:
{{Deprecated|version=2019r2|replacement=[[FolderItem.DriveAt]]}}
+
{{DeprecatedItem|version=2019r2|replacement=[[FolderItem.DriveAt]]}}
 
{{MethodBox
 
{{MethodBox
 
| name=Volume
 
| name=Volume

Latest revision as of 19:09, 3 September 2020

Method

Returns a FolderItem that represents a mounted volume.

Syntax

result=Volume(VolumeNumber)

Part Type Description
result FolderItem The mounted volume whose number was passed.
VolumeNumber Integer The number of the volume you require a FolderItem for. The boot volume is volume 0.

Notes

The Volume function returns a FolderItem that represents the mounted volume whose number was passed. Volume zero is the boot volume. This function can be used in conjunction with the VolumeCount function to loop through the mounted volumes.

Examples

This example places the names of all mounted volumes into a ListBox control:

Dim vols As Integer
vols = VolumeCount - 1
For i As Integer = 0 To vols
ListBox1.AddRow(Volume(i).Name)
Next

See Also

VolumeCount function; FolderItem class.