Ballerina API Documentation

Functions of ballerina.os package

public function getArchitecture() (string)

Returns the architecture of the operating system.

Return Parameters:

Return VariableData TypeDescription
stringOS 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.

Parameters:

Parameter NameData TypeDescription
namestringName of the environment variable

Return Parameters:

Return VariableData TypeDescription
stringEnvironment 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.

Parameters:

Parameter NameData TypeDescription
namestringName of the environment variable

Return Parameters:

Return VariableData TypeDescription
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 VariableData TypeDescription
stringOS 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 VariableData TypeDescription
stringOS version if the OS can be identified, an empty string otherwise


Menu

  • Functions
    • getArchitecture() (string )
    • getEnv(string name) (string )
    • getMultivaluedEnv(string name) (string[] )
    • getName() (string )
    • getVersion() (string )

Copyright 2017 Ballerina API Documentation