-- Environment os.environ() -- returns a copy of the environment os.setenv(name, value) os.unsetenv(name) -- Miscellaneous os.sleep(seconds) -- File system os.chdir(pathname) cwd = os.currentdir() os.mkdir(pathname) for stat in os.dir(pathname) do ; end stat = os.stat(pathname) --[[ stat is a table, contain at least the following keys: name: the filename type: "file" or "directory" or another implementation-defined string size: the file size in bytes --]] file = io.open("filename", "w") file:lock(mode, start, length) -- mode is "r" or "w", start and length are optional file:unlock(start, length) -- start and length are optional -- Process control pid = os.spawn(filename, {args={}, env={}, stdin=file, stdout=file, stderr=file}) in, out = os.pipe() -- in and out are io.file objects exitcode = os.wait(pid)