Re: Lua OS
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lua OS
- From: Coda Highland <chighland@...>
- Date: 2012年4月23日 20:50:28 -0500
> 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