lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hello list,

Recently I've been busy to write a filesystem module for Lua 5.3 and 5.4 based on the C++ std::filesystem library. [1]

The filesystem module supports the same features as std::filesystem does.
This includes the following;

- File operations such as copy, remove and renaming.
- Iterating (recursively) through directories.
- Create and remove symbolic links and hard links.
- Querying permissions and the type of a filesystem entry.
- Modifying permissions.

There is a reference [2] which is based on the filesystem reference that lists all functions and objects.

The filesystem module is not battle tested but I wrote tests to exercise the API.

The module is not pure Lua. So you need to build it and drop the library at a suitable location.
To build the module you must have at least have a C++17 compatible compiler.

I know there is already the LuaFileSystem module. [3]
The reason I started to write this module was to learn about std::filesystem and refreshing my knowledge of the Lua API.

I hope you like it.

-- Jasper