Functions of ballerina.runtime package
public function getCurrentDirectory() (string)
Returns the current working directory.
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | 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 Variable | Data Type | Description |
---|---|---|
string | Encoding if it is available, an empty string otherwise |
public function getProperties() (map)
Returns all system properties.
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
map | All system properties |
public function getProperty(string name) (string)
Returns the value associated with the specified property name.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
name | string | Name of the property |
Return Parameters:
Return Variable | Data Type | Description |
---|---|---|
string | 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 Name | Data Type | Description |
---|---|---|
name | string | Name of the property |
value | string | Value of the property |
public function sleepCurrentThread(int millis)
Halts the current thread for a predefined amount of time.
Parameters:
Parameter Name | Data Type | Description |
---|---|---|
millis | int | Amount of time to sleep in milliseconds |