Retrieves the directory name of the specified path.
string directory::get-name(path)
Parameters
Name | Type | Description |
---|---|---|
path | string | The directory's full path. The path parameter can be a file name, including a file on a Universal Naming Convention (UNC) share. |
Return Value
A string containing the name of the directory.
Examples
Gets directory name "test" from full path string.
<property name="test.dir" value="${directory::get-name('C:\Temp\bin\test')}" />
Requirements
- Assembly
- NAnt
.Core .dll - Namespace
-
NAnt
.Core .Functions