6.9 – Operating System Facilities

This library is implemented through table os.

os.setlocale()

os.setlocale (locale [, category]) Sets the current locale of the program. locale is a system-dependent string specifying a locale; category is an optional

2017-02-21 04:15:32
os.tmpname()

os.tmpname () Returns a string with a file name that can be used for a temporary file. The file must be explicitly opened before its use and explicitly removed when no longer

2017-02-21 04:15:33
os.getenv()

os.getenv (varname) Returns the value of the process environment variable varname, or nil if the variable is not defined.

2017-02-21 04:15:30
os.exit()

os.exit ([code [, close]]) Calls the ISO C function exit to terminate the host program. If code is true, the returned status is EXIT_SUCCESS;

2017-02-21 04:15:30
os.execute()

os.execute ([command]) This function is equivalent to the ISO C function system. It passes command to be executed by an operating system shell. Its first

2017-02-21 04:15:29
os.time()

os.time ([table]) Returns the current time when called without arguments, or a time representing the local date and time specified by the given table. This table must have fields

2017-02-21 04:15:33
os.rename()

os.rename (oldname, newname) Renames the file or directory named oldname to newname. If this function fails, it returns nil, plus a string describing

2017-02-21 04:15:31
os.remove()

os.remove (filename) Deletes the file (or empty directory, on POSIX systems) with the given name. If this function fails, it returns nil, plus a string describing the error

2017-02-21 04:15:31
os.clock()

os.clock () Returns an approximation of the amount in seconds of CPU time used by the program.

2017-02-21 04:15:27
os.date()

os.date ([format [, time]]) Returns a string or a table containing date and time, formatted according to the given string format. If the time

2017-02-21 04:15:28