iterates over all files in specified directory (data/lib in this case) searching for Lua files only
requires OS detection https://gist.github.com/Zbizu/43df621b3cd0dc460a76f7fe5aa87f30
if getOS():lower() == "windows" then | |
for path in io.popen("cd \"data\lib\" && dir *.lua /b/s"):lines() do | |
print(path) -- path = file name/directory | |
end | |
else | |
for path in io.popen("cd data/lib && find . -type f | grep .lua"):lines() do | |
print(path) | |
end | |
end |
iterates over all files in specified directory (data/lib in this case) searching for Lua files only
requires OS detection https://gist.github.com/Zbizu/43df621b3cd0dc460a76f7fe5aa87f30
This is not a cross-platform approach.