[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is there a lua module just like GNU's find?
- From: Natanael Copa <natanael.copa@...>
- Date: Fri, 16 Dec 2011 11:03:55 +0100
On Fri, Dec 16, 2011 at 10:46 AM, Xavier Wang <weasley.wx@gmail.com> wrote:
> Hi my dear list :-)
>
> I have try to find a lua module that acts like GNU find, it can
> enumerate files in a directory, and makes some filter on it:
>
> find "." :name ".svn" :prune()
> :OR():print()
>
>
> or something like it.
>
> Has someone heard it somewhere?
No, but I have been looking for exactly the same.
This might be of interest:
http://lua-users.org/wiki/DirTreeIterator
I have been thinking in the lines of:
find(startdir, maxdepth, function(file)
-- do something with file
end)
but your API looks nicer.
Would be awesome if something like that could be added to lfs or
penlight or added to its own library.
Thanks!
--
Natanael Copa