You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
mark 6d26939d9d *** empty log message *** 21 years ago
posix 21 years ago
w32api temporary Makefile 21 years ago
Makefile 21 years ago
README *** empty log message *** 21 years ago
environ.lua *** empty log message *** 21 years ago
sleep.c 21 years ago

README

-- Environment
os.environ
os.setenv(name, value, overwrite)
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.name is the filename
-- stat.type is one of "file" or "directory" or another implementation-defined string
-- stat.size is the file size in bytes

file = io.open("filename", "w")
file:lock(mode, start, len) -- mode is "r" or "w"; start and len are optional
file:unlock(start, len) -- start and len are optional

-- Process control
pid = os.spawn(filename, {args={}, env={}, stdin=io_file, stdout=io_file, stderr=io_file})
exitcode = os.wait(pid)