NAnt SDK Documentation - v0.92

PathFunctions.HasExtension Method 

Determines whether a path string includes an extension.

[Visual Basic]
<Function(Name:="has-extension")>
Public Shared Function HasExtension( _
   ByVal path As String _
) As Boolean
[C#]
[Function(Name="has-extension")]
public static bool HasExtension(
   string path
);

Parameters

path
The path to search for an extension.

Return Value

true. if the characters that follow the last directory separator or volume separator in the path include a period (.) followed by one or more characters; otherwise, false.

Exceptions

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

See Also

PathFunctions Class | NAnt.Core.Functions Namespace