[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Find
From:       gga <GGarramuno () aol ! com>
Date:       2007-10-08 11:35:04
Message-ID: 1191843161.061617.229670 () r29g2000hsg ! googlegroups ! com
[Download RAW message or body]


> >
> > >> the Ruby built-in Find module lacks a lot of features the
> > >> GNU find tools has. I wrote a new one (~170 lines).
> >
> > >>   <http://www.bertram-scharpf.de/tmp/find.rb>
> >
> > >> Maybe somebody likes it.
> >
> > > I wrote file-find not long ago:
> >
> > >http://raa.ruby-lang.org/project/file-find/
> >

Both seem complementary.  Bertram has sorting built-in and is not
backwards compatible.

After a quick look, Bertram's code also has silly inefficient things
like:
dir = (Dir.open @fullpath do |d| d.entries end) - SPECIAL_DIRS
which can just be:
dir = Dir.entries(@fullpath) - SPECIAL_DIRS
and the Etc module may be checked several times depending on what you
request.

Daniel's has searching based on different much more rich criteria and
also breaks backwards compatibility.  It lacks sorting and the docs
lack simple examples.  I did not check the code yet.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic