From: dblack@... Date: 2002-09-23T19:35:08+09:00 Subject: Re: Getting a directory tree Hi -- On Mon, 23 Sep 2002, Bruce Williams wrote: > Hal, > > The following is a performance test (using profile.rb and Linux' 'time') of... > > My implementation: > > --snip-- > require 'profile' > def getdirs root > Dir["#{root}/**/*"].select{ |file| test ?d, file and not test ?l, file } > end > getdirs '/home/iusris/devel' > --snip-- > > which uses the recursive ** Dir glob (of Zsh fame). The problem with that is it doesn't include anything whose name begins with a dot (at least on *nix). So the results are very different from what you get with Dir.entries. David -- David Alan Black | Register for RubyConf 2002! home: dblack@candle.superlink.net | November 1-3 work: blackdav@shu.edu | Seattle, WA, USA Web: http://pirate.shu.edu/~blackdav | http://www.rubyconf.com