lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> for file in path.find{basedir="/usr", name=pattern} do
>  print file, fs.stat(file).size
> end

Er. I've been writing too much Python. I forgot the parentheses on print!

And if you want a one-liner, you could use some sort of map() function.

map(path.find{basedir="/usr", name=pattern}, function(file)
print(file, fs.stat(file).size) end)

/s/ Adam