Ballerina API Documentation

Functions of ballerina.os package

public function getArchitecture() (string)

Returns the architecture of the Operating System.

Return Parameters:

Return VariableData TypeDescription
stringstring: 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 NameData TypeDescription
namestringname of the environment variable

Return Parameters:

Return VariableData TypeDescription
stringstring: 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 NameData TypeDescription
namestringname of the environment variable

Return Parameters:

Return VariableData TypeDescription
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 VariableData TypeDescription
stringstring: 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 VariableData TypeDescription
stringstring: OS 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