luaforge-lua-ex-0b41064
所属分类:其他
开发工具:Others
文件大小:24KB
下载次数:3
上传日期:2011-06-10 13:59:22
上 传 者:
chrob
说明: 非常棒的最小最快的脚本语言lua的扩展库,对于lua编程有益。
(lua extended libs, used for lua programming.)
文件列表:
luaforge-lua-ex-0b41064\.cvsignore (6, 2009-07-02)
luaforge-lua-ex-0b41064\Changelog (810, 2009-07-02)
luaforge-lua-ex-0b41064\conf.in (345, 2009-07-02)
luaforge-lua-ex-0b41064\COPYRIGHT (1340, 2009-07-02)
luaforge-lua-ex-0b41064\INSTALL (144, 2009-07-02)
luaforge-lua-ex-0b41064\JUST (2306, 2009-07-02)
luaforge-lua-ex-0b41064\Makefile (206, 2009-07-02)
luaforge-lua-ex-0b41064\posix\environ.h (255, 2009-07-02)
luaforge-lua-ex-0b41064\posix\ex.c (14060, 2009-07-02)
luaforge-lua-ex-0b41064\posix\Makefile (396, 2009-07-02)
luaforge-lua-ex-0b41064\posix\posix_spawn.c (1614, 2009-07-02)
luaforge-lua-ex-0b41064\posix\posix_spawn.h (2837, 2009-07-02)
luaforge-lua-ex-0b41064\posix\spawn.c (5199, 2009-07-02)
luaforge-lua-ex-0b41064\posix\spawn.h (711, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt1.lua (240, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt2.lua (162, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt3.lua (173, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt4.lua (160, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt5.lua (145, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt6.lua (276, 2009-07-02)
luaforge-lua-ex-0b41064\tests\rt7.lua (402, 2009-07-02)
luaforge-lua-ex-0b41064\TODO (589, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\dirent.c (1372, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\dirent.h (281, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\ex.c (16167, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\Makefile (314, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\pusherror.c (1399, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\pusherror.h (375, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\spawn.c (5734, 2009-07-02)
luaforge-lua-ex-0b41064\w32api\spawn.h (700, 2009-07-02)
luaforge-lua-ex-0b41064\posix (0, 2009-07-02)
luaforge-lua-ex-0b41064\tests (0, 2009-07-02)
luaforge-lua-ex-0b41064\w32api (0, 2009-07-02)
luaforge-lua-ex-0b41064 (0, 2009-07-02)
"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)
近期下载者:
相关文件:
收藏者: