Ballerina API Documentation

Functions of ballerina.runtime package

public function getCurrentDirectory() (string)

Returns the current working directory.

Return Parameters:

Return VariableData TypeDescription
stringstring: current 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
stringstring: Encoding if it is available, an empty string otherwise

public function getProperties() (map)

Returns all system properties.

Return Parameters:

Return VariableData TypeDescription
mapmap: all 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
stringstring: value 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)

Sleeps 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