Functions -
system
exec |
Executes an operating system command as a subprocess of the current process.
|
getEnv |
Returns the environment variable value associated with the provided name.
|
getUserHome |
Returns the current user's home directory path.
|
getUsername |
Returns the current user's name.
|
uuid |
Returns a random UUID string.
|
Executes an operating system command as a subprocess of the current process.
system:Process|system:Error proc = system:exec("ls", {}, "/", "-la")
Parameters
- command string
-
The name of the command to be executed
- env map (default map<string> $mapping$var$11 = {})
-
Environment variables to be set to the process
- dir string? (default <string?> ())
-
The current working directory to be set to the process
- args string[]
-
Command arguments to be passed in
Returns the environment variable value associated with the provided name.
string port = system:getEnv("HTTP_PORT");
Parameters
- name string
-
Name of the environment variable
-
Return Type
(string) Environment variable value if it exists or else an empty string
Returns the current user's home directory path.
string userHome = system:getUserHome();
-
Return Type
(string) Current user's home directory if it can be determined or else an empty string
Returns the current user's name.
string username = system:getUsername();
-
Return Type
(string) Current user's name if it can be determined or else an empty string