os library is a standard Lua library. It is a global library and does not need to be imported.
Refer to the official Lua documentation for more details.
os library has been extended with some additional functions.
os.sleep( time )
Sleep execution for
os.open( path, [args] )
Open the specified file using the default program. If the path is a script or executable then it will execute it in a new window. On Windows it uses
It can also be used to open folder on your desktop.
os.openall( path )
Open all of the files using the default program in the specified folder (e.g. all music files in a folder).
os.start( command, [arg1], [arg2], [...] )
Start the process or program specified by
command. It fires and forgets, namely, it does not wait for the process to end nor does it capture the output or result code. For that, use the standard
os.execute function instead.
command is also matched against installed applications.
Arguments can also be passed:
os.script( script )
Alias for script.default.
os.throw( message )
Generates an error and stops the current action.
os.throw("something bad happened >.<");