Merge pull request #484 from roji/transactions_pspe
[mono.git] / mcs / class / Mono.Posix / Documentation / en / Mono.Unix / UnixDriveInfo.xml
1 <Type Name="UnixDriveInfo" FullName="Mono.Unix.UnixDriveInfo">
2   <TypeSignature Language="C#" Value="public sealed class UnixDriveInfo" />
3   <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit UnixDriveInfo extends System.Object" />
4   <AssemblyInfo>
5     <AssemblyName>Mono.Posix</AssemblyName>
6     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
7     <AssemblyVersion>2.0.0.0</AssemblyVersion>
8     <AssemblyVersion>4.0.0.0</AssemblyVersion>
9   </AssemblyInfo>
10   <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
11   <Base>
12     <BaseTypeName>System.Object</BaseTypeName>
13   </Base>
14   <Interfaces />
15   <Docs>
16     <summary>Represents information about Unix volumes.</summary>
17     <remarks>
18       <para>
19         The <see cref="T:Mono.Unix.UnixDriveInfo" /> class presents
20         information about a Unix mount point or special file.  It allows basic
21         querying about the filesystem
22       </para>
23       <list type="bullet">
24         <item>
25           <term>
26           Total size and free disk space
27           (<see cref="P:Mono.Unix.UnixDriveInfo.TotalSize" /> and
28           <see cref="P:Mono.Unix.UnixDriveInfo.TotalFreeSpace" />).
29         </term>
30         </item>
31         <item>
32           <term>
33           Querying of all availble disk drives, 
34           <see cref="M:Mono.Unix.UnixDriveInfo.GetDrives" />, 
35           visible through <c>/etc/fstab</c>.
36         </term>
37         </item>
38       </list>
39       <para>
40         Information provided this type may not be valid for any significant
41         period of time, due to potential race conditions with other processes
42         running on the system or because of other actions being performed
43         within the current process.
44       </para>
45       <para>
46         The only gurantee is that the information provided <i>was</i> valid at
47         some point in time, <i>or</i> an 
48         <see cref="T:System.InvalidOperationException" /> will be thrown
49         when attempting to access the provided information.
50         <block subset="none" type="note">
51           To clarify, most properties will attempt to refresh the information
52           before returning it so that the information retrieved is as
53           up-to-date as possible, but it cannot take everything into
54           consideration.
55         </block></para>
56       <para>
57         Check the individual method and property documentation to determine 
58         if and when an exception will be thrown.
59       </para>
60     </remarks>
61   </Docs>
62   <Members>
63     <Member MemberName=".ctor">
64       <MemberSignature Language="C#" Value="public UnixDriveInfo (string mountPoint);" />
65       <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string mountPoint) cil managed" />
66       <MemberType>Constructor</MemberType>
67       <AssemblyInfo>
68         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
69         <AssemblyVersion>2.0.0.0</AssemblyVersion>
70         <AssemblyVersion>4.0.0.0</AssemblyVersion>
71       </AssemblyInfo>
72       <Parameters>
73         <Parameter Name="mountPoint" Type="System.String" />
74       </Parameters>
75       <Docs>
76         <param name="mountPoint">
77           A <see cref="T:System.String" /> containing the Unix mount point to
78           get information about.
79         </param>
80         <summary>
81           Creates a <see cref="T:Mono.Unix.UnixDriveInfo" /> instance
82           containing information about a Unix mount point and volume.
83         </summary>
84         <remarks>
85         </remarks>
86         <exception cref="T:System.ArgumentException">
87           <paramref name="mountPoint" /> isn't a valid mount point.
88         </exception>
89         <exception cref="T:System.ArgumentNullException">
90           <paramref name="mountPoint" /> is <see langword="null" />.
91         </exception>
92         <altmember cref="M:Mono.Unix.Native.Syscall.getfsfile" />
93       </Docs>
94     </Member>
95     <Member MemberName="AvailableFreeSpace">
96       <MemberSignature Language="C#" Value="public long AvailableFreeSpace { get; }" />
97       <MemberSignature Language="ILAsm" Value=".property instance int64 AvailableFreeSpace" />
98       <MemberType>Property</MemberType>
99       <AssemblyInfo>
100         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
101         <AssemblyVersion>2.0.0.0</AssemblyVersion>
102         <AssemblyVersion>4.0.0.0</AssemblyVersion>
103       </AssemblyInfo>
104       <ReturnValue>
105         <ReturnType>System.Int64</ReturnType>
106       </ReturnValue>
107       <Docs>
108         <summary>Gets the available free space for the drive.</summary>
109         <value>
110           A <see cref="T:System.Int64" /> containing the total available
111           free space on the drive.
112         </value>
113         <remarks>
114           <para>
115             The available free space is the space that normal users are able
116             to write to (in the absense of file system quotas which may
117             further limit how much disk space users can fill).  The drive may
118             have some space reserved for the super-user (<c>root</c>).
119           </para>
120           <para>
121             Use <see cref="P:Mono.Unix.UnixDriveInfo.TotalFreeSpace" /> for
122             the total free space, including space reserved for the super-user.
123           </para>
124         </remarks>
125         <exception cref="T:System.InvalidOperationException">
126           There was an error retrieving the total disk space.  
127           The volume may not be mounted.
128         </exception>
129       </Docs>
130     </Member>
131     <Member MemberName="DriveFormat">
132       <MemberSignature Language="C#" Value="public string DriveFormat { get; }" />
133       <MemberSignature Language="ILAsm" Value=".property instance string DriveFormat" />
134       <MemberType>Property</MemberType>
135       <AssemblyInfo>
136         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
137         <AssemblyVersion>2.0.0.0</AssemblyVersion>
138         <AssemblyVersion>4.0.0.0</AssemblyVersion>
139       </AssemblyInfo>
140       <ReturnValue>
141         <ReturnType>System.String</ReturnType>
142       </ReturnValue>
143       <Docs>
144         <summary>
145           Retrieves the file system format of the 
146           <paramref name="mountPoint" /> volume.
147         </summary>
148         <value>
149           A <see cref="T:System.String" /> containing the file system format
150           of the specified mount point.
151         </value>
152         <remarks>
153         </remarks>
154         <altmember cref="F:Mono.Unix.Native.Fstab.fs_vfstype" />
155       </Docs>
156     </Member>
157     <Member MemberName="DriveType">
158       <MemberSignature Language="C#" Value="public Mono.Unix.UnixDriveType DriveType { get; }" />
159       <MemberSignature Language="ILAsm" Value=".property instance valuetype Mono.Unix.UnixDriveType DriveType" />
160       <MemberType>Property</MemberType>
161       <AssemblyInfo>
162         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
163         <AssemblyVersion>2.0.0.0</AssemblyVersion>
164         <AssemblyVersion>4.0.0.0</AssemblyVersion>
165       </AssemblyInfo>
166       <ReturnValue>
167         <ReturnType>Mono.Unix.UnixDriveType</ReturnType>
168       </ReturnValue>
169       <Docs>
170         <summary>Gets the drive type.</summary>
171         <value>
172           A <see cref="T:Mono.Unix.UnixDriveType" /> specifying which type of
173           drive this mount point is.
174         </value>
175         <remarks>
176           Currently, this always returns 
177           <see cref="F:Mono.Unix.UnixDriveType.Unknown" />.
178         </remarks>
179       </Docs>
180     </Member>
181     <Member MemberName="GetDrives">
182       <MemberSignature Language="C#" Value="public static Mono.Unix.UnixDriveInfo[] GetDrives ();" />
183       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Mono.Unix.UnixDriveInfo[] GetDrives() cil managed" />
184       <MemberType>Method</MemberType>
185       <AssemblyInfo>
186         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
187         <AssemblyVersion>2.0.0.0</AssemblyVersion>
188         <AssemblyVersion>4.0.0.0</AssemblyVersion>
189       </AssemblyInfo>
190       <ReturnValue>
191         <ReturnType>Mono.Unix.UnixDriveInfo[]</ReturnType>
192       </ReturnValue>
193       <Parameters />
194       <Docs>
195         <summary>Gets information about all drives listed in <c>/etc/fstab</c>.</summary>
196         <returns>
197           A <see cref="T:Mono.Unix.UnixDriveInfo" /> array containing all
198           drives listed in <c>/etc/fstab</c>.
199         </returns>
200         <remarks>
201           <para>
202             This method only <i>conceptually</i> reads <c>/etc/fstab</c>;
203             it actually uses the corresponding 
204             <see cref="T:Mono.Unix.Native.Syscall" /> APIs, which may or may 
205             not actually read <c>/etc/fstab</c> (check your operating system
206             documentation).
207           </para>
208           <para>
209             This method does not return <c>/etc/fstab</c> entries which do not
210             correspond to actual mount points.  
211             <see cref="F:Mono.Unix.Native.Fstab.fs_file" /> must start with a 
212             forward-slash ("/").
213           </para>
214         </remarks>
215         <exception cref="T:System.IO.IOException">
216           There was an error calling 
217           <see cref="M:Mono.Unix.Native.Syscall.setfsent" />.
218         </exception>
219         <altmember cref="M:Mono.Unix.Native.Syscall.setfsent" />
220         <altmember cref="M:Mono.Unix.Native.Syscall.getfsent" />
221         <altmember cref="M:Mono.Unix.Native.Syscall.endfsent" />
222       </Docs>
223     </Member>
224     <Member MemberName="GetForSpecialFile">
225       <MemberSignature Language="C#" Value="public static Mono.Unix.UnixDriveInfo GetForSpecialFile (string specialFile);" />
226       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Mono.Unix.UnixDriveInfo GetForSpecialFile(string specialFile) cil managed" />
227       <MemberType>Method</MemberType>
228       <AssemblyInfo>
229         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
230         <AssemblyVersion>2.0.0.0</AssemblyVersion>
231         <AssemblyVersion>4.0.0.0</AssemblyVersion>
232       </AssemblyInfo>
233       <ReturnValue>
234         <ReturnType>Mono.Unix.UnixDriveInfo</ReturnType>
235       </ReturnValue>
236       <Parameters>
237         <Parameter Name="specialFile" Type="System.String" />
238       </Parameters>
239       <Docs>
240         <param name="specialFile">
241           A <see cref="T:System.String" /> containing the "special file"
242           (block device, generally the first field in <c>/etc/fstab</c>).
243         </param>
244         <summary>
245           Creates a <see cref="T:Mono.Unix.UnixDriveInfo" /> instance
246           containing information about the specified block device name.
247         </summary>
248         <returns>
249           A <see cref="T:Mono.Unix.UnixDriveInfo" /> instance containing
250           information about the specified special file (block device).
251         </returns>
252         <remarks>
253         </remarks>
254         <altmember cref="M:Mono.Unix.Native.Syscall.getfsspec" />
255       </Docs>
256     </Member>
257     <Member MemberName="IsReady">
258       <MemberSignature Language="C#" Value="public bool IsReady { get; }" />
259       <MemberSignature Language="ILAsm" Value=".property instance bool IsReady" />
260       <MemberType>Property</MemberType>
261       <AssemblyInfo>
262         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
263         <AssemblyVersion>2.0.0.0</AssemblyVersion>
264         <AssemblyVersion>4.0.0.0</AssemblyVersion>
265       </AssemblyInfo>
266       <ReturnValue>
267         <ReturnType>System.Boolean</ReturnType>
268       </ReturnValue>
269       <Docs>
270         <summary>
271           Returns a <see cref="T:System.Boolean" /> indicating whether the
272           specified mount point is connected and queryable.
273         </summary>
274         <value>
275           A <see cref="T:System.Boolean" /> indicating whether the
276           specified mount point is connected and queryable.
277         </value>
278         <remarks>
279           <para>
280             This property generates no exceptions.
281           </para>
282           <para>
283             If this property returns <see langword="true" />, then the other
284             properties should not generate
285             <see cref="T:System.InvalidOperationException" />s.
286           </para>
287         </remarks>
288       </Docs>
289     </Member>
290     <Member MemberName="MaximumFilenameLength">
291       <MemberSignature Language="C#" Value="public long MaximumFilenameLength { get; }" />
292       <MemberSignature Language="ILAsm" Value=".property instance int64 MaximumFilenameLength" />
293       <MemberType>Property</MemberType>
294       <AssemblyInfo>
295         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
296         <AssemblyVersion>2.0.0.0</AssemblyVersion>
297         <AssemblyVersion>4.0.0.0</AssemblyVersion>
298       </AssemblyInfo>
299       <ReturnValue>
300         <ReturnType>System.Int64</ReturnType>
301       </ReturnValue>
302       <Docs>
303         <summary>Gets the maximum filename length.</summary>
304         <value>
305           A <see cref="T:System.Int64" /> containing the maximum number of
306           bytes that may make up a filename.  This value varies from
307           filesystem to filesystem.
308         </value>
309         <remarks>
310           <para>
311             The operating system does not specify an encoding for filenames,
312             it just stores the bytes given to it.  Since 
313             <see cref="T:System.String" /> is a UTF-16 string encoding, each
314             character may require more than one byte to store in the
315             filesystem.  Consequently the maximum filename length can
316             <i>not</i> be directly compared against
317             <see cref="P:System.String.Length" />.
318           </para>
319         </remarks>
320         <exception cref="T:System.InvalidOperationException">
321           There was an error retrieving the maximum filename length.
322           The volume may not be mounted.
323         </exception>
324       </Docs>
325     </Member>
326     <Member MemberName="Name">
327       <MemberSignature Language="C#" Value="public string Name { get; }" />
328       <MemberSignature Language="ILAsm" Value=".property instance string Name" />
329       <MemberType>Property</MemberType>
330       <AssemblyInfo>
331         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
332         <AssemblyVersion>2.0.0.0</AssemblyVersion>
333         <AssemblyVersion>4.0.0.0</AssemblyVersion>
334       </AssemblyInfo>
335       <ReturnValue>
336         <ReturnType>System.String</ReturnType>
337       </ReturnValue>
338       <Docs>
339         <summary>Gets the mount point.</summary>
340         <value>
341           A <see cref="T:System.String" /> containinig the mount point of the
342           Unix volume.
343         </value>
344         <remarks>
345         </remarks>
346         <altmember cref="F:Mono.Unix.Native.Fstab.fs_file" />
347       </Docs>
348     </Member>
349     <Member MemberName="RootDirectory">
350       <MemberSignature Language="C#" Value="public Mono.Unix.UnixDirectoryInfo RootDirectory { get; }" />
351       <MemberSignature Language="ILAsm" Value=".property instance class Mono.Unix.UnixDirectoryInfo RootDirectory" />
352       <MemberType>Property</MemberType>
353       <AssemblyInfo>
354         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
355         <AssemblyVersion>2.0.0.0</AssemblyVersion>
356         <AssemblyVersion>4.0.0.0</AssemblyVersion>
357       </AssemblyInfo>
358       <ReturnValue>
359         <ReturnType>Mono.Unix.UnixDirectoryInfo</ReturnType>
360       </ReturnValue>
361       <Docs>
362         <summary>Gets information about the mount point directory.</summary>
363         <value>
364           A <see cref="T:Mono.Unix.UnixDirectoryInfo" /> instance containing
365           information about the mount point directory.
366         </value>
367         <remarks>
368         </remarks>
369         <altmember cref="F:Mono.Unix.Native.Fstab.fs_file" />
370       </Docs>
371     </Member>
372     <Member MemberName="ToString">
373       <MemberSignature Language="C#" Value="public override string ToString ();" />
374       <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
375       <MemberType>Method</MemberType>
376       <AssemblyInfo>
377         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
378         <AssemblyVersion>2.0.0.0</AssemblyVersion>
379         <AssemblyVersion>4.0.0.0</AssemblyVersion>
380       </AssemblyInfo>
381       <ReturnValue>
382         <ReturnType>System.String</ReturnType>
383       </ReturnValue>
384       <Parameters />
385       <Docs>
386         <summary>To be added.</summary>
387         <returns>To be added.</returns>
388         <remarks>To be added.</remarks>
389       </Docs>
390     </Member>
391     <Member MemberName="TotalFreeSpace">
392       <MemberSignature Language="C#" Value="public long TotalFreeSpace { get; }" />
393       <MemberSignature Language="ILAsm" Value=".property instance int64 TotalFreeSpace" />
394       <MemberType>Property</MemberType>
395       <AssemblyInfo>
396         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
397         <AssemblyVersion>2.0.0.0</AssemblyVersion>
398         <AssemblyVersion>4.0.0.0</AssemblyVersion>
399       </AssemblyInfo>
400       <ReturnValue>
401         <ReturnType>System.Int64</ReturnType>
402       </ReturnValue>
403       <Docs>
404         <summary>Gets the total free space on the volume.</summary>
405         <value>
406           A <see cref="T:System.Int64" /> containing the total free space on
407           the Unix volume.
408         </value>
409         <remarks>
410           <para>
411             The total free space includes all the free space on the Unix
412             volume, and may include space the normal users are not able to
413             write to, either because of disk quotas or because space is
414             reserved for the super-user (<c>root</c>).
415           </para>
416           <para>
417             Use <see cref="P:Mono.Unix.UnixDriveInfo.AvailableFreeSpace" /> for
418             the available free space, excluding space reserved for the 
419             super-user.
420           </para>
421         </remarks>
422         <exception cref="T:System.InvalidOperationException">
423           There was an error retrieving the total free space.  
424           The volume may not be mounted.
425         </exception>
426       </Docs>
427     </Member>
428     <Member MemberName="TotalSize">
429       <MemberSignature Language="C#" Value="public long TotalSize { get; }" />
430       <MemberSignature Language="ILAsm" Value=".property instance int64 TotalSize" />
431       <MemberType>Property</MemberType>
432       <AssemblyInfo>
433         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
434         <AssemblyVersion>2.0.0.0</AssemblyVersion>
435         <AssemblyVersion>4.0.0.0</AssemblyVersion>
436       </AssemblyInfo>
437       <ReturnValue>
438         <ReturnType>System.Int64</ReturnType>
439       </ReturnValue>
440       <Docs>
441         <summary>Gets the total size of the Unix volume.</summary>
442         <value>
443           A <see cref="T:System.Int64" /> containing the total size of the
444           volume.
445         </value>
446         <remarks>
447         </remarks>
448         <exception cref="T:System.InvalidOperationException">
449           There was an error retrieving the total size.  
450           The volume may not be mounted.
451         </exception>
452       </Docs>
453     </Member>
454     <Member MemberName="VolumeLabel">
455       <MemberSignature Language="C#" Value="public string VolumeLabel { get; }" />
456       <MemberSignature Language="ILAsm" Value=".property instance string VolumeLabel" />
457       <MemberType>Property</MemberType>
458       <AssemblyInfo>
459         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
460         <AssemblyVersion>2.0.0.0</AssemblyVersion>
461         <AssemblyVersion>4.0.0.0</AssemblyVersion>
462       </AssemblyInfo>
463       <ReturnValue>
464         <ReturnType>System.String</ReturnType>
465       </ReturnValue>
466       <Docs>
467         <summary>Gets the block device name.</summary>
468         <value>
469           A <see cref="T:System.String" /> containing the block device for
470           this volume.
471         </value>
472         <remarks>
473         </remarks>
474         <altmember cref="F:Mono.Unix.Native.Fstab.fs_spec" />
475       </Docs>
476     </Member>
477   </Members>
478 </Type>