From: Jason Creighton Date: 2003-09-19T14:36:54+09:00 Subject: Re: Dir.foreach not with patterns? On Thu, 18 Sep 2003 15:59:25 +0100 Alan Davies wrote: > Weirich, James wrote: > > >> I like the Dir[] form (or its "glob" alternative). I used to write > >> recursive functions to search a directory tree. Then I discovered > >> Dir['**/*.rb']. Not only is it easier, it's also faster. > > I'm not so sure. I timed my recursive "Filescan" class against Dir[] on > a large fileserver. Dir[] took 92 seconds, and my Filescan class only > took 72 seconds. > > I also prefer the ordering of the output of my Filescan class. Could you post your Filescan class? I'd like to see it, and compare w/ find.rb in the standard distribution. Jason Creighton