[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns the directory information for the specified path string.
Assembly: System.IO (in System.IO.dll)
- Type: System..::..String
The path of a file or directory.
In most cases, the string returned by this method consists of all characters in the path up to but not including the last DirectorySeparatorChar. If the path consists of a root directory, such as "c:\", null is returned. Note that this method does not support paths using "file:". Because the returned path does not include the DirectorySeparatorChar, passing the returned path back into the method will result in the truncation of one folder level per subsequent call on the result string. For example, passing the path "C:\Directory\SubDirectory\test.txt" into the method will return "C:\Directory\SubDirectory". Passing that string, "C:\Directory\SubDirectory", into will result in "C:\Directory".
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.