VolumeCount

From REALbasicWiki

Jump to: navigation, search

Contents

[edit] Prototype

Function VolumeCount( ) As Integer

[edit] Description

The VolumeCount function returns the number of volumes currently mounted by the Operating System.

[edit] Discussion

[edit] Sample Code

This function returns an array of all mounted volumes.

Function Volumes() as FolderItem()
  dim theList() as FolderItem
  for i as Integer = 0 to VolumeCount - 1
    dim theVolume as FolderItem = Volume(i)
    if theVolume is nil then
      continue
    end if
    theList.Append theVolume
  next
  return theList
End Function
Personal tools
related