1 <?xml version="1.0" encoding="utf-8"?>
4 <name>System.IO.FileSystem.DriveInfo</name>
7 <member name="T:System.IO.DriveInfo">
8 <summary>Provides access to information on a drive.</summary>
10 <member name="M:System.IO.DriveInfo.#ctor(System.String)">
11 <summary>Provides access to information on the specified drive.</summary>
12 <param name="driveName">A valid drive path or drive letter. This can be either uppercase or lowercase, 'a' to 'z'. A null value is not valid.</param>
13 <exception cref="T:System.ArgumentNullException">The drive letter cannot be <see langword="null" />.</exception>
14 <exception cref="T:System.ArgumentException">The first letter of <paramref name="driveName" /> is not an uppercase or lowercase letter from 'a' to 'z'.
18 <paramref name="driveName" /> does not refer to a valid drive.</exception>
20 <member name="M:System.IO.DriveInfo.GetDrives">
21 <summary>Retrieves the drive names of all logical drives on a computer.</summary>
22 <exception cref="T:System.IO.IOException">An I/O error occurred (for example, a disk error or a drive was not ready).</exception>
23 <exception cref="T:System.UnauthorizedAccessException">The caller does not have the required permission.</exception>
24 <returns>An array of type <see cref="T:System.IO.DriveInfo" /> that represents the logical drives on a computer.</returns>
26 <member name="M:System.IO.DriveInfo.System#Runtime#Serialization#ISerializable#GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
27 <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with the data needed to serialize the target object.</summary>
28 <param name="info">The object to populate with data.</param>
29 <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext" />) for this serialization.</param>
31 <member name="M:System.IO.DriveInfo.ToString">
32 <summary>Returns a drive name as a string.</summary>
33 <returns>The name of the drive.</returns>
35 <member name="P:System.IO.DriveInfo.AvailableFreeSpace">
36 <summary>Indicates the amount of available free space on a drive, in bytes.</summary>
37 <exception cref="T:System.UnauthorizedAccessException">Access to the drive information is denied.</exception>
38 <exception cref="T:System.IO.IOException">An I/O error occurred (for example, a disk error or a drive was not ready).</exception>
39 <returns>The amount of free space available on the drive, in bytes.</returns>
41 <member name="P:System.IO.DriveInfo.DriveFormat">
42 <summary>Gets the name of the file system, such as NTFS or FAT32.</summary>
43 <exception cref="T:System.UnauthorizedAccessException">Access to the drive information is denied.</exception>
44 <exception cref="T:System.IO.DriveNotFoundException">The drive does not exist or is not mapped.</exception>
45 <exception cref="T:System.IO.IOException">An I/O error occurred (for example, a disk error or a drive was not ready).</exception>
46 <returns>The name of the file system on the specified drive.</returns>
48 <member name="P:System.IO.DriveInfo.DriveType">
49 <summary>Gets the drive type, such as CD-ROM, removable, network, or fixed.</summary>
50 <returns>One of the enumeration values that specifies a drive type.</returns>
52 <member name="P:System.IO.DriveInfo.IsReady">
53 <summary>Gets a value that indicates whether a drive is ready.</summary>
55 <see langword="true" /> if the drive is ready; <see langword="false" /> if the drive is not ready.</returns>
57 <member name="P:System.IO.DriveInfo.Name">
58 <summary>Gets the name of a drive, such as C:\.</summary>
59 <returns>The name of the drive.</returns>
61 <member name="P:System.IO.DriveInfo.RootDirectory">
62 <summary>Gets the root directory of a drive.</summary>
63 <returns>An object that contains the root directory of the drive.</returns>
65 <member name="P:System.IO.DriveInfo.TotalFreeSpace">
66 <summary>Gets the total amount of free space available on a drive, in bytes.</summary>
67 <exception cref="T:System.UnauthorizedAccessException">Access to the drive information is denied.</exception>
68 <exception cref="T:System.IO.DriveNotFoundException">The drive is not mapped or does not exist.</exception>
69 <exception cref="T:System.IO.IOException">An I/O error occurred (for example, a disk error or a drive was not ready).</exception>
70 <returns>The total free space available on a drive, in bytes.</returns>
72 <member name="P:System.IO.DriveInfo.TotalSize">
73 <summary>Gets the total size of storage space on a drive, in bytes.</summary>
74 <exception cref="T:System.UnauthorizedAccessException">Access to the drive information is denied.</exception>
75 <exception cref="T:System.IO.DriveNotFoundException">The drive is not mapped or does not exist.</exception>
76 <exception cref="T:System.IO.IOException">An I/O error occurred (for example, a disk error or a drive was not ready).</exception>
77 <returns>The total size of the drive, in bytes.</returns>
79 <member name="P:System.IO.DriveInfo.VolumeLabel">
80 <summary>Gets or sets the volume label of a drive.</summary>
81 <exception cref="T:System.IO.IOException">An I/O error occurred (for example, a disk error or a drive was not ready).</exception>
82 <exception cref="T:System.IO.DriveNotFoundException">The drive is not mapped or does not exist.</exception>
83 <exception cref="T:System.Security.SecurityException">The caller does not have the required permission.</exception>
84 <exception cref="T:System.UnauthorizedAccessException">The volume label is being set on a network or CD-ROM drive.
88 Access to the drive information is denied.</exception>
89 <returns>The volume label.</returns>
91 <member name="T:System.IO.DriveNotFoundException">
92 <summary>The exception that is thrown when trying to access a drive or share that is not available.</summary>
94 <member name="M:System.IO.DriveNotFoundException.#ctor">
95 <summary>Initializes a new instance of the <see cref="T:System.IO.DriveNotFoundException" /> class with its message string set to a system-supplied message and its HRESULT set to COR_E_DIRECTORYNOTFOUND.</summary>
97 <member name="M:System.IO.DriveNotFoundException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
98 <summary>Initializes a new instance of the <see cref="T:System.IO.DriveNotFoundException" /> class with the specified serialization and context information.</summary>
99 <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the serialized object data about the exception being thrown.</param>
100 <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains contextual information about the source or destination of the exception being thrown.</param>
102 <member name="M:System.IO.DriveNotFoundException.#ctor(System.String)">
103 <summary>Initializes a new instance of the <see cref="T:System.IO.DriveNotFoundException" /> class with the specified message string and the HRESULT set to COR_E_DIRECTORYNOTFOUND.</summary>
104 <param name="message">A <see cref="T:System.String" /> object that describes the error. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
106 <member name="M:System.IO.DriveNotFoundException.#ctor(System.String,System.Exception)">
107 <summary>Initializes a new instance of the <see cref="T:System.IO.DriveNotFoundException" /> class with the specified error message and a reference to the inner exception that is the cause of this exception.</summary>
108 <param name="message">The error message that explains the reason for the exception.</param>
109 <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not <see langword="null" />, the current exception is raised in a <see langword="catch" /> block that handles the inner exception.</param>
111 <member name="T:System.IO.DriveType">
112 <summary>Defines constants for drive types, including CDRom, Fixed, Network, NoRootDirectory, Ram, Removable, and Unknown.</summary>
114 <member name="F:System.IO.DriveType.CDRom">
115 <summary>The drive is an optical disc device, such as a CD or DVD-ROM.</summary>
117 <member name="F:System.IO.DriveType.Fixed">
118 <summary>The drive is a fixed disk.</summary>
120 <member name="F:System.IO.DriveType.Network">
121 <summary>The drive is a network drive.</summary>
123 <member name="F:System.IO.DriveType.NoRootDirectory">
124 <summary>The drive does not have a root directory.</summary>
126 <member name="F:System.IO.DriveType.Ram">
127 <summary>The drive is a RAM disk.</summary>
129 <member name="F:System.IO.DriveType.Removable">
130 <summary>The drive is a removable storage device, such as a USB flash drive.</summary>
132 <member name="F:System.IO.DriveType.Unknown">
133 <summary>The type of drive is unknown.</summary>