Ballerina API Documentation

Functions of ballerina.runtime package

public function getCurrentDirectory() (string)

Returns the current working directory.

Return Parameters:

Return VariableData TypeDescription
stringCurrent working directory or an empty string if the current working directory cannot be determined

public function getFileEncoding() (string)

Returns the charset encoding used in the runtime.

Return Parameters:

Return VariableData TypeDescription
stringEncoding if it is available, an empty string otherwise

public function getProperties() (map)

Returns all system properties.

Return Parameters:

Return VariableData TypeDescription
mapAll system properties

public function getProperty(string name) (string)

Returns the value associated with the specified property name.

Parameters:

Parameter NameData TypeDescription
namestringName of the property

Return Parameters:

Return VariableData TypeDescription
stringValue of the property if the property exists, an empty string otherwise

public function setProperty(string name, string value)

Adds the given name, value pair to the system properties.

Parameters:

Parameter NameData TypeDescription
namestringName of the property
valuestringValue of the property

public function sleepCurrentThread(int millis)

Halts the current thread for a predefined amount of time.

Parameters:

Parameter NameData TypeDescription
millisintAmount of time to sleep in milliseconds


Menu

  • Functions
    • getCurrentDirectory() (string )
    • getFileEncoding() (string )
    • getProperties() (map )
    • getProperty(string name) (string )
    • setProperty(string name, string value)
    • sleepCurrentThread(int millis)

Copyright 2017 Ballerina API Documentation