Summary
Gets the user name of the person who started the current thread.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- EnvironmentFunctions
Syntax
[Function("get-user-name")]
public static string GetUserName()
Examples
Modify the home directory of the current user on unix-based systems.
<exec program="usermod">
<arg value="-d" />
<arg value="/home/temp" />
<arg value="${environment::get-user-name()}" />
</exec>
Attributes
Type | Description |
---|---|
FunctionAttribute | Indicates that the method should be exposed as a function in NAnt build files. |
Return Value
Type | Description |
---|---|
string | The name of the person logged on to the system who started the current thread. |