PathFunctions.

GetFileName(string) Method

Summary

Returns the filename for the specified path string.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions
Containing Type
PathFunctions

Syntax

[Function("get-file-name")]
public static string GetFileName(string path)

Attributes

Type Description
FunctionAttribute Indicates that the method should be exposed as a function in NAnt build files.

Parameters

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

Return Value

Type Description
string

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.