Skip to content

Instantly share code, notes, and snippets.

@Techcable
Techcable / fs.lua
Created February 10, 2017 03:25
A portable filesystem API using LuaJIT's FFI
-- A portable filesystem API using LuaJIT's FFI
--
local ffi = require("ffi")
local table = require("table")
require("string")
-- Cache needed functions and locals
local C, errno, string = ffi.C, ffi.errno, ffi.string
local concat, insert = table.concat, table.insert
-- "Standard" C99 functions