NAnt SDK Documentation - v0.92

DirectoryFunctions.GetDirectoryRoot Method 

Returns the volume information, root information, or both for the specified path.

[Visual Basic]
<Function(Name:="get-directory-root")>
Public Function GetDirectoryRoot( _
   ByVal path As String _
) As String
[C#]
[Function(Name="get-directory-root")]
public string GetDirectoryRoot(
   string path
);

Parameters

path
The path for which to retrieve the parent directory.

Return Value

A string containing the volume information, root information, or both for the specified path.

Exceptions

Exception Type Condition
ArgumentException path is a zero-length string, contains only white space, or contains one or more invalid characters.
PathTooLongException The specified path, file name, or both exceed the system-defined maximum length.

See Also

DirectoryFunctions Class | NAnt.Core.Functions Namespace