mscorlib 2.0.0.0 4.0.0.0 System.Object System.Runtime.Serialization.ISerializable System.Runtime.InteropServices.ComVisible(true)

This class models a drive and provides methods and properties to query for drive information. Use to determine what drives are available, and what type of drives they are. You can also query to determine the capacity and available free space on the drive.

Provides access to information on a drive.

- Constructor
  2.0.0.0
  4.0.0.0

  Use this class to obtain information on drives. The drive name must be either an uppercase or lowercase letter from 'a' to 'z'. You cannot use this method to obtain information on drive names that are null or use UNC (\\server\share) paths.

  Provides access to information on the specified drive.

  A valid drive path or drive letter. This can be either uppercase or lowercase, 'a' to 'z'. A null value is not valid.
- Property
  2.0.0.0
  4.0.0.0
  System.Int64 To be added.

  This property indicates the amount of free space available on the drive. Note that this number may be different from the number because this property takes into account disk quotas.

  Indicates the amount of available free space on a drive, in bytes.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  Use to determine what formatting a drive uses.

  Gets the name of the file system, such as NTFS or FAT32.

- Property
  2.0.0.0
  4.0.0.0
  System.IO.DriveType To be added.

  The property indicates whether a drive is one of the following: CDRom, Fixed, Network, NoRootDirectory, Ram, Removable, or Unknown. These values are described in the enumeration.

  Gets the drive type, such as CD-ROM, removable, network, or fixed.

- Method
  2.0.0.0
  4.0.0.0
  System.IO.DriveInfo[]

  This method retrieves all logical drive names on a computer. You can use this information to iterate through the array and obtain information on the drives using other methods and properties. Use the property to test whether a drive is ready because using this method on a drive that is not ready will throw a .

  Retrieves the drive names of all logical drives on a computer.

  An array of type that represents the logical drives on a computer.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  indicates whether a drive is ready. For example, it indicates whether a CD is in a CD drive or whether a removable storage device is ready for read/write operations. If you do not test whether a drive is ready, and it is not ready, querying the drive using will raise an .

  Do not rely on to avoid catching exceptions from other members such as , , and . Between the time that your code checks and then accesses one of the other properties (even if the access occurs immediately after the check), a drive may have been disconnected or a disk may have been removed.

  Gets a value that indicates whether a drive is ready.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  This property is the name assigned to the drive, such as C:\ or E:\.

  Gets the name of a drive, such as C:\.

- Property
  2.0.0.0
  4.0.0.0
  System.IO.DirectoryInfo To be added. To be added.

  Gets the root directory of a drive.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Any objects included in the object are automatically tracked and serialized by the formatter.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  Populates a object with the data needed to serialize the target object.

  The object to populate with data. The destination (see ) for this serialization.
- Method
  2.0.0.0
  4.0.0.0
  System.String

  This method returns the property.

  Returns a drive name as a string.

  The name of the drive.

- Property
  2.0.0.0
  4.0.0.0
  System.Int64 To be added.

  This property indicates the total amount of free space available on the drive, not just what is available to the current user.

  Gets the total amount of free space available on a drive, in bytes.

- Property
  2.0.0.0
  4.0.0.0
  System.Int64 To be added.

  This property indicates the total size of the drive in bytes, not just what is available to the current user.

  Gets the total size of storage space on a drive, in bytes.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  The label length is determined by the operating system. For example, NTFS allows a volume label to be up to 32 characters long. Note that null is a valid .

  Gets or sets the volume label of a drive.