The Lua Extension API is a proposal for a standard set of functions to provide a more complete programming environment for Lua. This is now hosted at http://code.google.com/p/lua-ex-api/ This repository was converted from a CVS repository on luaforge.net on Jan. 20, 2010. If you are the maintainer, please fork and then email luaforge@gmail.com a…
luaforge/lua-ex
master
Name already in use
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
"ex" API implementation http://lua-users.org/wiki/ExtensionProposal Copyright 2007 Mark Edgar < medgar at gmail com > -- Environment os.getenv(name) -- get environment variable os.setenv(name, value) -- set/unset environment variable os.environ() -- returns a copy of the environment -- File system cwd = os.currentdir() os.chdir(pathname) os.mkdir(pathname) os.remove(pathname) for entry in os.dir(pathname) do ; end entry = os.dirent(pathname) --[[ entry 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 os.sleep(seconds) -- sleep for (floating-point) seconds os.sleep(interval, unit) -- sleep for interval/unit seconds pid = os.spawn(filename, {args={}, env={}, stdin=file, stdout=file, stderr=file}) exitcode = pid:wait(pid)
About
The Lua Extension API is a proposal for a standard set of functions to provide a more complete programming environment for Lua. This is now hosted at http://code.google.com/p/lua-ex-api/ This repository was converted from a CVS repository on luaforge.net on Jan. 20, 2010. If you are the maintainer, please fork and then email luaforge@gmail.com a…