ballerina/system package
Primitives Summary
Type Definitions
Annotations
Name |
Attachement Points |
Data Type |
Description |
Objects Summary
Endpoints Summary
Functions Summary
Return Type |
Function and Description |
string |
getCurrentDirectory()
Returns the current working directory.
|
string |
getEnv(string name)
Returns the environment variable value associated with the provided name.
|
string |
getUserHome()
Returns the current user's home directory path.
|
string |
getUsername()
Returns the current user's name.
|
string |
uuid()
Returns a random UUID string.
|
Global Variables
Name |
Data Type |
Description |
public function getCurrentDirectory() returns (string)
Returns the current working directory.
|
Return Type |
|
Description |
|
string |
|
Current working directory or an empty string if the current working directory cannot be determined
|
public function getEnv(string name) returns (string)
Returns the environment variable value associated with the provided name.
Parameter Name |
Data Type |
Default Value |
Description |
name |
string |
|
Name of the environment variable
|
|
Return Type |
|
Description |
|
string |
|
Environment variable value if it exists, otherwise an empty string
|
public function getUserHome() returns (string)
Returns the current user's home directory path.
|
Return Type |
|
Description |
|
string |
|
Current user's home directory if it can be determined, an empty string otherwise
|
public function getUsername() returns (string)
Returns the current user's name.
|
Return Type |
|
Description |
|
string |
|
Current user's name if it can be determined, an empty string otherwise
|
public function uuid() returns (string)
Returns a random UUID string.
|
Return Type |
|
Description |
|
string |
|
The random string
|