I fully agree with you but just want to add that you can do it in "pure" Lua :
for file in io.popen("ls "..dir):lines() do
...
end
This should never be used in real applications and a proper filesystem module should be used instead. But, I find it very useful for quick one-shot scripts I write for batch processing some files.
for file in io.popen("ls "..dir):lines() do ... end
This should never be used in real applications and a proper filesystem module should be used instead. But, I find it very useful for quick one-shot scripts I write for batch processing some files.