Transaction now has limited support for PromotableSinglePhaseEnlistment
[mono.git] / mcs / class / Mono.Posix / Documentation / en / Mono.Unix / UnixPath.xml
1 <Type Name="UnixPath" FullName="Mono.Unix.UnixPath">
2   <TypeSignature Language="C#" Value="public sealed class UnixPath" />
3   <AssemblyInfo>
4     <AssemblyName>Mono.Posix</AssemblyName>
5     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
6     <AssemblyVersion>2.0.0.0</AssemblyVersion>
7   </AssemblyInfo>
8   <ThreadingSafetyStatement>This type is safe for multithreaded operations.</ThreadingSafetyStatement>
9   <Base>
10     <BaseTypeName>System.Object</BaseTypeName>
11   </Base>
12   <Interfaces />
13   <Docs>
14     <summary>
15       Performs operations on <see cref="T:System.String" /> instances that
16       contain file or directory path information.
17     </summary>
18     <remarks>
19       <para>
20         A path is a string that provides the location of a file or directory. 
21         A path does not necessarily point to a location on disk; for example, 
22         a path may map to a location in memory or on a device. Paths are
23         composed of the components described below. Component names are shown 
24         in <paramref name="italics " /> and the following table describes the 
25         symbols used in component definitions:
26       </para>
27       <list type="table">
28         <listheader>
29           <term>Symbol</term>
30           <description>Description</description>
31         </listheader>
32         <item>
33           <term> &lt; &gt;</term>
34           <description>Indicates a path component.</description>
35         </item>
36         <item>
37           <term> { } </term>
38           <description>
39             Indicates a grouping; either all components in a grouping are 
40             present, or none are permitted to be present.
41           </description>
42         </item>
43         <item>
44           <term> *</term>
45           <description>
46             Indicates that the component or grouping that immediately precedes
47             this symbol can appear zero, one, or multiple times.
48           </description>
49         </item>
50         <item>
51           <term> ?</term>
52           <description>
53             Indicates that the component or grouping that immediately precedes
54             this symbol can appear zero, or one times.
55           </description>
56         </item>
57         <item>
58           <term> +</term>
59           <description>Indicates string concatenation.</description>
60         </item>
61       </list>
62       <para>The components that define a path are as follows:</para>
63       <para>
64         <paramref name="Directory Name" />: A string that specifies one or 
65         more directory levels in a file system. If a directory name contains
66         multiple levels, a <paramref name="directory separator character" /> 
67         separates the levels; however, a directory name does not begin or
68         end with a directory separator character. In the example path 
69         <c>/foo/bar/bat.txt</c>, the directory name is "<c>foo/bar</c>". 
70         <see cref="M:Mono.Unix.UnixPath.GetDirectoryName(System.String)" /> 
71         returns the directory name component of a path.  Note that this method 
72         does include a beginning separator character if one is included
73         in the specified path.
74       </para>
75       <para>
76         <paramref name="Directory Separator Character" />: An 
77         implementation-defined constant string containing a single printable
78         non-alphanumeric character used to separate levels in a file system. 
79         In the example path <c>/foo/bar/bat.txt</c>, the directory separator 
80         character is "<c>/</c>". 
81         The <see cref="F:Mono.Unix.UnixPath.DirectorySeparatorChar" /> and 
82         <see cref="F:Mono.Unix.UnixPath.AltDirectorySeparatorChar" /> store
83         implementation-defined directory separator characters.
84       </para>
85       <para>
86         <paramref name="Extension" />: A string that consists of the 
87         characters at the end of a file name, from and including the last 
88         <paramref name="extension separator character" />. The minimum and
89         maximum lengths of extension components are platform-specific. In the 
90         example path "<c>/foo/bar/bat.txt</c>", the 
91         <paramref name="extension" /> is "<c>.txt</c>". The 
92         <see cref="M:System.IO.Path.GetExtension(System.String)" /> method 
93         returns the extension component of a path.
94       </para>
95       <para>
96         <paramref name="Extension Separator Character" />: An 
97         implementation-defined constant string composed of a single character 
98         that appears after the last character in the 
99         <paramref name="file base" /> component indicating the beginning of 
100         the <paramref name="extension" /> component. If the extension separator 
101         character "<paramref name="." />" is the first character in a 
102         <paramref name="file name" />, it is not interpreted as a extension 
103         separator character.  If more than one extension separator 
104         character appears in a file name, only the last occurrence is the
105         extension separator character; all other occurrences are part of the 
106         file base component.  In the example path "<c>/foo/bar/bat.txt</c>", 
107         the extension separator character is "<c>.</c>".
108       </para>
109       <para>
110         <paramref name="File Base" />: A string containing the 
111         <paramref name="file name" /> with the <paramref name="extension" /> 
112         component removed. In the example path "<c>/foo/bar/bat.txt</c>", 
113         the file base is "<c>bat</c>".  The 
114         <see cref="M:System.IO.Path.GetFileNameWithoutExtension(System.String)" /> 
115         method returns the file base component of a path.
116       </para>
117       <para>
118         <paramref name="File Name" />: A string containing all information 
119         required to uniquely identify a file within a directory. This 
120         component is defined as follows:
121       </para>
122       <para>
123         <c>&lt;file base&gt;{+&lt;extension&gt;}?</c>
124       </para>
125       <para>
126         The file name component is commonly referred to as a relative 
127         file name. In the example path "<c>/foo/bar/bat.txt</c>", the 
128         file name is "<c>bat.txt</c>". The 
129         <see cref="M:Mono.Unix.UnixPath.GetFileName(System.String)" />
130         method returns the file name component of a path.
131       </para>
132       <para>
133         <paramref name="Full Directory Name" />: A string containing all 
134         information required to uniquely identify a directory within a file
135         system. This component is defined as follows:
136       </para>
137       <para>
138         <c>&lt;path root&gt;+&lt;directory name&gt;</c>
139       </para>
140       <para>
141         The full directory name component is commonly referred to as the 
142         absolute directory name. In the example path "<c>/foo/bar/bat.txt</c>", 
143         the full directory name is "<c>/foo/bar</c>".
144       </para>
145       <para>
146         <paramref name="Full Path" />: A string containing all information 
147         required to uniquely identify a file within a file system. This 
148         component is defined as follows:
149       </para>
150       <para>
151         <c>&lt;full directory name&gt;+&lt;directory separator 
152         character&gt;+&lt;file name&gt;</c>
153       </para>
154       <para>
155         The full path component is commonly referred to as the absolute 
156         file name. In the example path "<c>/foo/bar/bat.txt</c>", the full 
157         path is "<c>/foo/bar/bat.txt</c>". 
158         The <see cref="M:Mono.Unix.UnixPath.GetFullPath(System.String)" /> 
159         method returns the full path component.
160       </para>
161       <para>
162         <paramref name="Path Root" />: A string containing all information 
163         required to uniquely identify the highest level in a file system. 
164         The component is defined as follows:
165       </para>
166       <para>
167         <c>{&lt;volume identifier&gt;+&lt;volume separator 
168         character&gt;}?+&lt;directory separator character&gt;</c>
169       </para>
170       <para>
171         In the example path <c>/foo/bar/bat.txt</c> , the path root is 
172         "<c>/</c>". 
173         The <see cref="M:Mono.Unix.UnixPath.GetPathRoot(System.String)" />
174         method returns the <paramref name="path root" /> component.
175       </para>
176       <para>
177         The exact format of a path is determined by the current platform. 
178         On some systems, paths containing file names can contain extensions. 
179         The format of an extension is platform dependent; for example, some 
180         systems limit extensions to three characters, while others do not. 
181         The current platform and possibly the current file system determine 
182         the set of characters used to separate the elements of a path, and 
183         the set of characters that cannot be used when specifying paths.
184         Because of these differences, the fields of the 
185         <see cref="T:Mono.Unix.UnixPath" /> class as well as the exact behavior
186         of some members of the <see cref="T:Mono.Unix.UnixPath" /> class are 
187         determined by the current platform and/or file system.
188       </para>
189       <para>
190         A path contains either absolute or relative location information. 
191         Absolute paths fully specify a location: the file or directory can be 
192         uniquely identified regardless of the current location. A full path or 
193         full directory name component is present in an absolute path. 
194         Relative paths specify a partial location: the current working 
195         directory is used as the starting point when locating a file specified 
196         with a relative path.
197         <block subset="none" type="note">
198           To determine the current working directory, call 
199           <see cref="M:Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory" />.
200         </block></para>
201       <para>
202         Most members of the <see langword="UnixPath" /> class do not interact 
203         with the file system and do not verify the existence of the file or 
204         directory specified by a path string. 
205         <see cref="T:Mono.Unix.UnixPath" /> members that modify a path string, 
206         such as 
207         <see cref="M:Mono.Unix.UnixPath.Combine(System.String,System.String)" />, 
208         have no effect on files and directories in the file system. 
209         <see cref="T:Mono.Unix.UnixPath" /> members do, however, validate the 
210         contents of a specified path string, and throw 
211         <see cref="T:System.ArgumentException" /> if the string contains 
212         characters that are not valid in path strings, as defined by the 
213         current platform and file system. Implementations are required to 
214         preserve the case of file and directory path strings, and to be case 
215         sensitive if and only if the current platform is case-sensitive.
216       </para>
217     </remarks>
218   </Docs>
219   <Members>
220     <Member MemberName="AltDirectorySeparatorChar">
221       <MemberSignature Language="C#" Value="public static readonly char AltDirectorySeparatorChar;" />
222       <MemberType>Field</MemberType>
223       <ReturnValue>
224         <ReturnType>System.Char</ReturnType>
225       </ReturnValue>
226       <Docs>
227         <summary>
228           Provides a character used to separate directory levels in a
229           hierarchical file system.
230         </summary>
231         <remarks>
232           <para>This field is read-only.</para>
233           <para>This is the value <c>/</c>.</para>
234         </remarks>
235       </Docs>
236       <AssemblyInfo>
237         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
238         <AssemblyVersion>2.0.0.0</AssemblyVersion>
239       </AssemblyInfo>
240     </Member>
241     <Member MemberName="Combine">
242       <MemberSignature Language="C#" Value="public static string Combine (string path1, string[] paths);" />
243       <MemberType>Method</MemberType>
244       <ReturnValue>
245         <ReturnType>System.String</ReturnType>
246       </ReturnValue>
247       <Parameters>
248         <Parameter Name="path1" Type="System.String" />
249         <Parameter Name="paths" Type="System.String[]">
250           <Attributes>
251             <Attribute>
252               <AttributeName>System.ParamArray</AttributeName>
253             </Attribute>
254           </Attributes>
255         </Parameter>
256       </Parameters>
257       <Docs>
258         <param name="path1">
259           A <see cref="T:System.String" /> containing the
260           first path.
261         </param>
262         <param name="paths">
263           A <see cref="T:System.String" /> array containing paths to append to
264           <paramref name="path1" />.
265         </param>
266         <summary>Concatentates multiple path strings.</summary>
267         <returns>
268           <para>
269             A <see cref="T:System.String" /> containing 
270             <paramref name="path1" /> followed by each sequential element in
271             <paramref name="paths" />.
272           </para>
273           <para>
274             If any of the specified paths is a zero-length string, it is ig
275           </para>
276         </returns>
277         <remarks>To be added.</remarks>
278       </Docs>
279       <AssemblyInfo>
280         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
281         <AssemblyVersion>2.0.0.0</AssemblyVersion>
282       </AssemblyInfo>
283     </Member>
284     <Member MemberName="DirectorySeparatorChar">
285       <MemberSignature Language="C#" Value="public static readonly char DirectorySeparatorChar;" />
286       <MemberType>Field</MemberType>
287       <ReturnValue>
288         <ReturnType>System.Char</ReturnType>
289       </ReturnValue>
290       <Docs>
291         <summary>
292           Provides a character used to separate directory levels in a
293           hierarchical file system.
294         </summary>
295         <remarks>
296           <para>This field is read-only.</para>
297           <para>This is the value <c>/</c>.</para>
298         </remarks>
299       </Docs>
300       <AssemblyInfo>
301         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
302         <AssemblyVersion>2.0.0.0</AssemblyVersion>
303       </AssemblyInfo>
304     </Member>
305     <Member MemberName="GetCanonicalPath">
306       <MemberSignature Language="C#" Value="public static string GetCanonicalPath (string path);" />
307       <MemberType>Method</MemberType>
308       <ReturnValue>
309         <ReturnType>System.String</ReturnType>
310       </ReturnValue>
311       <Parameters>
312         <Parameter Name="path" Type="System.String" />
313       </Parameters>
314       <Docs>
315         <param name="path">To be added.</param>
316         <summary>To be added.</summary>
317         <returns>To be added.</returns>
318         <remarks>To be added.</remarks>
319       </Docs>
320       <AssemblyInfo>
321         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
322         <AssemblyVersion>2.0.0.0</AssemblyVersion>
323       </AssemblyInfo>
324     </Member>
325     <Member MemberName="GetCompleteRealPath">
326       <MemberSignature Language="C#" Value="public static string GetCompleteRealPath (string path);" />
327       <MemberType>Method</MemberType>
328       <ReturnValue>
329         <ReturnType>System.String</ReturnType>
330       </ReturnValue>
331       <Parameters>
332         <Parameter Name="path" Type="System.String" />
333       </Parameters>
334       <Docs>
335         <param name="path">To be added.</param>
336         <summary>To be added.</summary>
337         <returns>To be added.</returns>
338         <remarks>To be added.</remarks>
339       </Docs>
340       <AssemblyInfo>
341         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
342         <AssemblyVersion>2.0.0.0</AssemblyVersion>
343       </AssemblyInfo>
344     </Member>
345     <Member MemberName="GetDirectoryName">
346       <MemberSignature Language="C#" Value="public static string GetDirectoryName (string path);" />
347       <MemberType>Method</MemberType>
348       <ReturnValue>
349         <ReturnType>System.String</ReturnType>
350       </ReturnValue>
351       <Parameters>
352         <Parameter Name="path" Type="System.String" />
353       </Parameters>
354       <Docs>
355         <param name="path">To be added.</param>
356         <summary>To be added.</summary>
357         <returns>To be added.</returns>
358         <remarks>To be added.</remarks>
359       </Docs>
360       <AssemblyInfo>
361         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
362         <AssemblyVersion>2.0.0.0</AssemblyVersion>
363       </AssemblyInfo>
364     </Member>
365     <Member MemberName="GetFileName">
366       <MemberSignature Language="C#" Value="public static string GetFileName (string path);" />
367       <MemberType>Method</MemberType>
368       <ReturnValue>
369         <ReturnType>System.String</ReturnType>
370       </ReturnValue>
371       <Parameters>
372         <Parameter Name="path" Type="System.String" />
373       </Parameters>
374       <Docs>
375         <param name="path">To be added.</param>
376         <summary>To be added.</summary>
377         <returns>To be added.</returns>
378         <remarks>To be added.</remarks>
379       </Docs>
380       <AssemblyInfo>
381         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
382         <AssemblyVersion>2.0.0.0</AssemblyVersion>
383       </AssemblyInfo>
384     </Member>
385     <Member MemberName="GetFullPath">
386       <MemberSignature Language="C#" Value="public static string GetFullPath (string path);" />
387       <MemberType>Method</MemberType>
388       <ReturnValue>
389         <ReturnType>System.String</ReturnType>
390       </ReturnValue>
391       <Parameters>
392         <Parameter Name="path" Type="System.String" />
393       </Parameters>
394       <Docs>
395         <param name="path">To be added.</param>
396         <summary>To be added.</summary>
397         <returns>To be added.</returns>
398         <remarks>To be added.</remarks>
399       </Docs>
400       <AssemblyInfo>
401         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
402         <AssemblyVersion>2.0.0.0</AssemblyVersion>
403       </AssemblyInfo>
404     </Member>
405     <Member MemberName="GetInvalidPathChars">
406       <MemberSignature Language="C#" Value="public static char[] GetInvalidPathChars ();" />
407       <MemberType>Method</MemberType>
408       <ReturnValue>
409         <ReturnType>System.Char[]</ReturnType>
410       </ReturnValue>
411       <Parameters />
412       <Docs>
413         <summary>To be added.</summary>
414         <returns>To be added.</returns>
415         <remarks>To be added.</remarks>
416       </Docs>
417       <AssemblyInfo>
418         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
419         <AssemblyVersion>2.0.0.0</AssemblyVersion>
420       </AssemblyInfo>
421     </Member>
422     <Member MemberName="GetPathRoot">
423       <MemberSignature Language="C#" Value="public static string GetPathRoot (string path);" />
424       <MemberType>Method</MemberType>
425       <ReturnValue>
426         <ReturnType>System.String</ReturnType>
427       </ReturnValue>
428       <Parameters>
429         <Parameter Name="path" Type="System.String" />
430       </Parameters>
431       <Docs>
432         <param name="path">To be added.</param>
433         <summary>To be added.</summary>
434         <returns>To be added.</returns>
435         <remarks>To be added.</remarks>
436       </Docs>
437       <AssemblyInfo>
438         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
439         <AssemblyVersion>2.0.0.0</AssemblyVersion>
440       </AssemblyInfo>
441     </Member>
442     <Member MemberName="GetRealPath">
443       <MemberSignature Language="C#" Value="public static string GetRealPath (string path);" />
444       <MemberType>Method</MemberType>
445       <ReturnValue>
446         <ReturnType>System.String</ReturnType>
447       </ReturnValue>
448       <Parameters>
449         <Parameter Name="path" Type="System.String" />
450       </Parameters>
451       <Docs>
452         <param name="path">To be added.</param>
453         <summary>To be added.</summary>
454         <returns>To be added.</returns>
455         <remarks>To be added.</remarks>
456       </Docs>
457       <AssemblyInfo>
458         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
459         <AssemblyVersion>2.0.0.0</AssemblyVersion>
460       </AssemblyInfo>
461     </Member>
462     <Member MemberName="IsPathRooted">
463       <MemberSignature Language="C#" Value="public static bool IsPathRooted (string path);" />
464       <MemberType>Method</MemberType>
465       <ReturnValue>
466         <ReturnType>System.Boolean</ReturnType>
467       </ReturnValue>
468       <Parameters>
469         <Parameter Name="path" Type="System.String" />
470       </Parameters>
471       <Docs>
472         <param name="path">To be added.</param>
473         <summary>To be added.</summary>
474         <returns>To be added.</returns>
475         <remarks>To be added.</remarks>
476       </Docs>
477       <AssemblyInfo>
478         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
479         <AssemblyVersion>2.0.0.0</AssemblyVersion>
480       </AssemblyInfo>
481     </Member>
482     <Member MemberName="PathSeparator">
483       <MemberSignature Language="C#" Value="public static readonly char PathSeparator;" />
484       <MemberType>Field</MemberType>
485       <ReturnValue>
486         <ReturnType>System.Char</ReturnType>
487       </ReturnValue>
488       <Docs>
489         <summary>
490           Provides a character to separate path strings in environment
491           variables.
492         </summary>
493         <remarks>
494           <para>This field is read-only.</para>
495           <para>This is the value <c>:</c>.</para>
496         </remarks>
497       </Docs>
498       <AssemblyInfo>
499         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
500         <AssemblyVersion>2.0.0.0</AssemblyVersion>
501       </AssemblyInfo>
502     </Member>
503     <Member MemberName="ReadLink">
504       <MemberSignature Language="C#" Value="public static string ReadLink (string path);" />
505       <MemberType>Method</MemberType>
506       <ReturnValue>
507         <ReturnType>System.String</ReturnType>
508       </ReturnValue>
509       <Parameters>
510         <Parameter Name="path" Type="System.String" />
511       </Parameters>
512       <Docs>
513         <param name="path">To be added.</param>
514         <summary>To be added.</summary>
515         <returns>To be added.</returns>
516         <remarks>To be added.</remarks>
517       </Docs>
518       <AssemblyInfo>
519         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
520         <AssemblyVersion>2.0.0.0</AssemblyVersion>
521       </AssemblyInfo>
522     </Member>
523     <Member MemberName="TryReadLink">
524       <MemberSignature Language="C#" Value="public static string TryReadLink (string path);" />
525       <MemberType>Method</MemberType>
526       <ReturnValue>
527         <ReturnType>System.String</ReturnType>
528       </ReturnValue>
529       <Parameters>
530         <Parameter Name="path" Type="System.String" />
531       </Parameters>
532       <Docs>
533         <param name="path">To be added.</param>
534         <summary>To be added.</summary>
535         <returns>To be added.</returns>
536         <remarks>To be added.</remarks>
537       </Docs>
538       <AssemblyInfo>
539         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
540         <AssemblyVersion>2.0.0.0</AssemblyVersion>
541       </AssemblyInfo>
542     </Member>
543     <Member MemberName="VolumeSeparatorChar">
544       <MemberSignature Language="C#" Value="public static readonly char VolumeSeparatorChar;" />
545       <MemberType>Field</MemberType>
546       <ReturnValue>
547         <ReturnType>System.Char</ReturnType>
548       </ReturnValue>
549       <Docs>
550         <summary>
551           Provides a character to separate volumes from volume-specific paths.
552         </summary>
553         <remarks>
554           <para>This field is read-only.</para>
555           <para>This is the value <c>/</c>.</para>
556           <para>
557             This field is basically useless, since Unix uses a
558             singly-rooted file system, all volumes are sub-directories of the
559             path <c>/</c>.
560           </para>
561         </remarks>
562       </Docs>
563       <AssemblyInfo>
564         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
565         <AssemblyVersion>2.0.0.0</AssemblyVersion>
566       </AssemblyInfo>
567     </Member>
568   </Members>
569 </Type>