NAnt SDK Documentation - v0.85-nightly-2005-11-09

PathFunctions.GetFileName Method 

[This is preliminary documentation and subject to change.]

Returns the filename for the specified path string.

[Visual Basic]
<Function(Name:="get-file-name")>
Public Shared Function GetFileName( _
   ByVal path As String _
) As String
[C#]
[Function(Name="get-file-name")]
public static string GetFileName(
   string path
);

Parameters

path
The path string from which to obtain the file name and extension.

Return Value

A String consisting of the characters after the last directory character in path.

If the last character of path is a directory or volume separator character, an empty String is returned.

Remarks

Missing <remarks> documentation for M:NAnt.Core.Functions.PathFunctions.GetFileName(System.String)

Exceptions

Exception Type Condition
ArgumentException path contains one or more invalid characters.

See Also

PathFunctions Class | NAnt.Core.Functions Namespace