ballerina.os package
public function getArchitecture ( ) ( string )
Returns the architecture of the operating system.
Return Variable | Data Type | Description |
---|---|---|
string | OS architecture if the OS can be identified, an empty string otherwise |
public function getEnv ( string name ) ( string )
Returns the environment variable value associated with the provided name.
Parameter Name | Data Type | Description |
---|---|---|
name | string | Name of the environment variable |
Return Variable | Data Type | Description |
---|---|---|
string | Environment variable value if it exists, otherwise an empty string |
public function getMultivaluedEnv ( string name ) ( string[] )
Splits the value of an environment variable using path separator and returns the separated values as an array.
Parameter Name | Data Type | Description |
---|---|---|
name | string | Name of the environment variable |
Return Variable | Data Type | Description |
---|---|---|
string[] | Environment variable values as an array if the provided environment variable exists, otherwise an empty array |
public function getName ( ) ( string )
Returns the name of the operating system.
Return Variable | Data Type | Description |
---|---|---|
string | OS name if the OS can be identified, an empty string otherwise |
public function getVersion ( ) ( string )
Returns the version of the operating system.
Return Variable | Data Type | Description |
---|---|---|
string | OS version if the OS can be identified, an empty string otherwise |