Functions

getEnv
I

Returns the environment variable value associated with the provided name.

getUserHome
I

Returns the current user's home directory path.

getUsername
I

Returns the current user's name.

getEnv

function getEnv(string name) returns string
Isolated Function

Returns the environment variable value associated with the provided name.

1string port = os: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

getUserHome

function getUserHome() returns string
Isolated Function

Returns the current user's home directory path.

1string userHome = os:getUserHome();

Return Type

(string)

Current user's home directory if it can be determined or else an empty string

getUsername

function getUsername() returns string
Isolated Function

Returns the current user's name.

1string username = os:getUsername();

Return Type

(string)

Current user's name if it can be determined or else an empty string