NAnt SDK Documentation - v0.85-nightly-2005-11-09

EnvironmentFunctions.GetFolderPath Method 

[This is preliminary documentation and subject to change.]

Gets the path to the system special folder identified by the specified enumeration.

[Visual Basic]
<Function(Name:="get-folder-path")>
Public Shared Function GetFolderPath( _
   ByVal folder As SpecialFolder _
) As String
[C#]
[Function(Name="get-folder-path")]
public static string GetFolderPath(
   SpecialFolder folder
);

Parameters

folder
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 ("").

Remarks

Missing <remarks> documentation for M:NAnt.Core.Functions.EnvironmentFunctions.GetFolderPath(System.Environment.SpecialFolder)

Exceptions

Exception Type Condition
ArgumentException folder is not a member of SpecialFolder.

Example

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

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

See Also

EnvironmentFunctions Class | NAnt.Core.Functions Namespace