LUA is a small scripting language designed to be embedded inside your application to provide extensibility.
It is also possible to extend the Lua scripting language itself via the use of extensions written in C. This page describes such an extension which provides a small number of basic filesystem primitives.
The extensions are all coded in a small shared library, written in C. This library contains the small amount of glue required to export the functions along with the actual primitives themselves.
The primitives exported are described more fully in the lua-fs documentation:
- Available filesystem primitives:
This project was started when I was coding a simple Lua webserver and became frustrated at the lack of available filesystem primitives.
You can download the source of the extension and the documentation here:
- lua-fs-0.3.tar.gz - [9k]
To compile this code you'll need the LUA 5.1 development headers and libraries installed upon your system.
Compilation has only been tested upon x86, running Debian's Sarge distribution. If you manage to compile the code upon another Distribution, or version, then please let me know.
Compilation should be as simple as running "make", install the library with "make install" - to remove the library you can run "make uninstall".
To execute the testsuite run "make test" after running "make install".