FS API Lua implementation