NAnt Help Function Reference path::change-extension | v0.90 |
Changes the extension of the path string.
string path::change-extension(path, extension)
Name | Type | Description |
---|---|---|
path | string | The path information to modify. The path cannot contain any of the characters defined in InvalidPathChars InvalidPathChars. |
extension | string | The new extension (with a leading period). Specify a null reference to remove an existing extension from path. |
A string containing the modified path information.
On Windows-based desktop platforms, if path is an empty String, the path information is returned unmodified. If path has no extension, the returned path String contains extension appended to the end of path.