Functions of ballerina.os package
public function getArchitecture() (string)
Returns the architecture of the Operating System.
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string: OS architecture if the OS can be identified, an empty string otherwise |
public function getEnv(string name) (string)
Returns environment variable which is associated with the provided name.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
name | string | name of the environment variable |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string: environment variable value if exists, otherwise an empty string |
public function getMultivaluedEnv(string name) (string[])
Splits the value of a environment variable using path separator and returns the separated values as an array.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
name | string | name of the environment variable |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string[] | 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 Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | 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 Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | string: OS version if the OS can be identified, an empty string otherwise |