List of files in dir
#1
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.
Reply
Thanks given by:
#2
I'm currently using this, but it's Windows-specific:
for filename in io.popen([[dir wikipages\\api\\*.txt /b]]):lines() do
Reply
Thanks given by: NiLSPACE
#3
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
Reply
Thanks given by:
#4
I'm thinking about bringing in the LuaFileSystem library:
https://github.com/mc-server/MCServer/issues/162

LFS: https://github.com/keplerproject/luafilesystem
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)