Luxio provides extremely low-level bindings to many POSIX system calls, returning results as uncooked as possible, and even returning errno so you can handle things yourself. This is often not very nice to use. To safe your santity, there is the luxio.simple wrapper, which makes things delightful and lovely. > sio = require "luxio.simple" > h = sio.open("/etc/motd", "r") Nice tostring methods: > =h file descriptor: 3 (/etc/motd) Familiar interface for reading, writing, closing: > =h:read "*l" The programs included with the Debian GNU/Linux system are free software; > h:close() Open a file for read/write, c = O_CREAT, e = O_EXCL. The third parameter is what mode to give it when creating. In luxio.simple, permission modes can be passed as strings you might pass to chmod, or octal strings, or just numbers. If you're really sick, you can pass the string ls -l produces. > h = sio.open("testfile", "rwce", "u+rw") > =h file descriptor: 3 (testfile) Various stat() functionality exists. Even fstat() is provided: > for i, v in pairs(h:stat()) do print(i,v) end dev 65027 rdev 0 nlink 1 atime 1372260763 ctime 1372260763 blksize 4096 ino 7079478 mtime 1372260763 gid 1000 blocks 0 mode 33152 uid 1000 size 0 > h:close() > sio.unlink "testfile" Standard IO streams are provided, too. > =sio.stdout file descriptor: 1 () > sio.stdout:write "Hello, world!\n" Hello, world! Pipes and socketpairs are supported. Even datagram socketpairs are. > r, w = sio.pipe() > =r file descriptor: 3 () > =w file descriptor: 4 () > w:write "hello!\n" > =r:read "*l" hello! > r:close(); w:close() > sock1, sock2 = sio.socketpair(luxio.SOCK_DGRAM) > =sock1 file descriptor: 3 () > =sock2 file descriptor: 4 () > sock1:close(); sock2:close() Use the getaddrinfo() interface to connect to services while ignoring the trickyness of different protocols: > sock = sio.connect("www.lua.org", "http") > =sock file descriptor: 5 () > sock:write "HEAD / HTTP/1.1\r\nHost: www.lua.org\r\nConnection: Close\r\n\r\n" > return sock:read "*a" HTTP/1.1 200 OK Server: Zeus/4.3 Content-Type: text/html Content-Length: 2701 Accept-Ranges: bytes Last-Modified: Wed, 15 May 2013 13:19:29 GMT Date: Wed, 26 Jun 2013 15:44:12 GMT X-Varnish: 1466339377 Age: 0 Via: 1.1 varnish Connection: close Luxio also features server sockets, UNIX domain sockets, directory enumeration, fork/exec, a nifty subprocess module (allows you to spawn processes and control all of their file descriptors, including stdin/out etc), a managed interface to poll(), and bags of other goodles.