Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

Drives Property

Location

My.Computer.FileSystem.Drives

Syntax

Dim result As System.Collections.ObjectModel.ReadOnlyCollection( _ Of System.IO.DriveInfo) = My.Computer.FileSystem.Drives

Description

The Drives property returns a collection of System.IO.DriveInfo objects that represents the available logical disk drives currently configured on the local workstation.

Public Members

Each DriveInfo object in the returned collection has many useful members that provide information about each logical drive. See the GetDriveInfo entry in this chapter for a summary of the members of this object.

Usage at a Glance

  • The returned collection is read-only.

  • An error occurs if the user lacks sufficient privileges to retrieve the drive list.

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.FileSystemProxy.Drives Propertry

  • Microsoft.VisualBasic.FileIO.FileSystem.Drives Propertry

  • System.IO.DriveInfo.GetDrives Method

See Also

CurrentDirectory Property, FileSystem Object, FindInFiles Method, GetDirectories Method, GetDirectoryInfo Method, GetDriveInfo Method, GetFileInfo Method, GetFiles Method, GetTempFileName Method

Категории