PathFunctions.

GetExtension(string) Method

Summary

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

Syntax

[Function("get-extension")]
public static string GetExtension(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 get the extension.

Return Value

Type Description
string A string containing the extension of the specified path (including the "."), or an empty string if path does not have extension information.