From: nobu.nokada@... Date: 2002-09-23T20:07:48+09:00 Subject: Re: Getting a directory tree Hi, At Mon, 23 Sep 2002 19:35:08 +0900, dblack@candle.superlink.net wrote: > > --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. Dir["#{root}/**/{.[^.],..?,}*/"].select {|file| not test ?l, file} -- Nobu Nakada