List of files in dir - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: List of files in dir (/thread-1144.html) |
List of files in dir - NiLSPACE - 05-26-2013 I need a way to get a list of all the files in a directory or is there already a function. I googled for it but i could not find a way to do it. RE: List of files in dir - xoft - 09-12-2013 I'm currently using this, but it's Windows-specific: for filename in io.popen([[dir wikipages\\api\\*.txt /b]]):lines() do RE: List of files in dir - FakeTruth - 09-12-2013 I think we have something for that. MCServer uses it to load all files in a plugin directory. I can't look it up right now though. Also I'm not sure if it's exposed to lua RE: List of files in dir - xoft - 09-12-2013 I'm thinking about bringing in the LuaFileSystem library: https://github.com/mc-server/MCServer/issues/162 LFS: https://github.com/keplerproject/luafilesystem |