MySQL Shell API 9.0.0
Unified development interface for MySQL Products
Methods | Properties | List of all members
Os Class Reference

Gives access to functions which allow to interact with the operating system. More...

Methods

String getcwd ()
 Retrieves the absolute path of the current working directory. More...
 
String getenv (String name)
 Retrieves the value of the specified environment variable. More...
 
String loadTextFile (String path)
 Reads the contents of a text file. More...
 
Undefined sleep (Number seconds)
 Stops the execution for the given number of seconds. More...
 

Properties

Path path
 Gives access to path-related functions.
 

Detailed Description

Gives access to functions which allow to interact with the operating system.

Member Function Documentation

◆ getcwd()

String getcwd ( )

Retrieves the absolute path of the current working directory.

Returns
The absolute path of the current working directory.

◆ getenv()

String getenv ( String  name)

Retrieves the value of the specified environment variable.

Parameters
nameThe name of the environment variable.
Returns
The value of environment variable, or null if given variable does not exist.

◆ loadTextFile()

String loadTextFile ( String  path)

Reads the contents of a text file.

Parameters
pathThe path to the file to be read.
Returns
The contents of the text file.
Exceptions
RuntimeErrorIf the specified file does not exist.

◆ sleep()

Undefined sleep ( Number  seconds)

Stops the execution for the given number of seconds.

Parameters
secondsThe number of seconds to sleep for.