From: Stuart Clarke Date: 2010-01-09T04:02:59+09:00 Subject: Re: Setting recursion depth Thats for this, will give it a try Fleck Jean-Julien wrote: > Hello, > >> def get_non_empty_dir_to_depth(n) >> �search_to_depth(n+1).collect{|f| File.dirname(f)}.uniq >> end > > Well, in fact, there is a much simpler way that does get empty > directories: > > def get_dir_to_depth(n) > search_to_depth(n).select {|f| File.directory?(f)} > end > > Cheers, -- Posted via http://www.ruby-forum.com/.