environment::get-folder-path

Gets the path to the system special folder identified by the specified enumeration.
string environment::get-folder-path(folder)

Parameters

Name Type Description
folder Environment.SpecialFolder An enumerated constant that identifies a system special folder.

Return Value

The path to the specified system special folder, if that folder physically exists on your computer; otherwise, the empty string ("").

Examples

Copy "out.log" from the project base directory to the program files directory.

<copy file="out.log" todir="${environment::get-folder-path('ProgramFiles')}" />

Requirements

Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions