oslib¶
clock¶
Returns an approximation of the amount in seconds of CPU time used by the program.
date¶
Returns a string or a table containing date and time, formatted according to the given string format
.
difftime¶
Returns the difference, in seconds, from time t1
to time t2
.
execute¶
function os.execute(command?: string)
-> suc: boolean?
2. exitcode: ("exit"|"signal")?
3. code: integer?
Passes command
to be executed by an operating system shell.
exit¶
Calls the ISO C function exit
to terminate the host program.
getenv¶
Returns the value of the process environment variable varname
.
remove¶
Deletes the file with the given name.
rename¶
Renames the file or directory named oldname
to newname
.
setlocale¶
function os.setlocale(locale: string|nil, category?: "all"|"collate"|"ctype"|"monetary"|"numeric"...(+1))
-> localecategory: string
Sets the current locale of the program.
time¶
Returns the current time when called without arguments, or a time representing the local date and time specified by the given table.
tmpname¶
Returns a string with a file name that can be used for a temporary file.