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 6a20bb8e99 *** empty log message *** 21 years ago
posix *** empty log message *** 21 years ago
w32api *** empty log message *** 21 years ago
Makefile renamed w32api/osex.c to ex.c 21 years ago
README renamed w32api/osex.c to ex.c 21 years ago
environ.lua *** empty log message *** 21 years ago
rt1.lua renamed w32api/osex.c to ex.c 21 years ago
rt2.lua renamed w32api/osex.c to ex.c 21 years ago
rt3.lua *** empty log message *** 21 years ago
rt4.lua *** empty log message *** 21 years ago
rt5.lua *** empty log message *** 21 years ago
sleep.c 21 years ago

README

-- Environment
os.setenv(name, value)
os.unsetenv(name)
os.environ() -- returns a copy of the environment

-- 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, containing at least the following keys:
	name: the filename
	type: "file" or "directory" or another implementation-defined string
	size: the file size in bytes
--]]

-- Locking and pipes
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
in, out = io.pipe()

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