Using the Extension
Once the library has been installed upon the system it will be automatically available for use by all your Lua scripts.
This is the preferred way to load the library and gain access to all the functions contained within it:
-- Load the library from the system installation socket = require( "libfs" );If you choose not to install the library system-wide you may instead load it via something like this:
-- Load the library from the current directory. fs = assert(loadlib("./libfs.so", "luaopen_libfs"))() -- Test it worked. print ( fs.version .. " loaded OK" );Once you've managed to load the library correctly you'll be ready to use the provided API to work with your filesystem.