Skip to content

Instantly share code, notes, and snippets.

@Wizzard033
Wizzard033 / fs.lua
Last active April 10, 2022 01:00 — forked from Techcable/fs.lua
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 band = bit.band
local concat, insert = table.concat, table.insert