LuaFileSystem (https://keplerproject.github.io/luafilesystem/) is a library that provides a portable way to access directory structure and file attributes from lua.