On Tue, Nov 13, 2007 at 11:23:00PM +0900, Robert Klemme wrote:
> 2007/11/13, Jigar Gosar <jigar.gosar / gmail.com>:
> > base_dir = "C:/pde"
> >
> > def list base_dir
> >   d= Dir.new base_dir
> >   d.each  {|x|
> >     return "asd" if x.eql? "."
> >     return "asd" if x.eql? ".."
> >     puts "Got #{x}"
> >     full_name = base_dir+"/"+x
> >     if(File.directory?(full_name))
> >       list full_name
> >     end
> >   }
> > end
> >
> Not exactly the answer you were looking for, but...
> 
> 15:21:46 /$ ruby -r find -e 'Find.find("/tmp") {|f| puts f}'
> /tmp
> /tmp/uscreens
> /tmp/uscreens/S-rklemme
> /tmp/4052
> /tmp/4052/sshlog
> /tmp/4052/servicelog
> /tmp/4052/runlog
> /tmp/4052/keylog
> /tmp/.X11-unix
> /tmp/.X11-unix/X0

Or even

Dir["/tmp/**/*"]

see http://www.ruby-doc.org/core/classes/Dir.html#M002348

Regards,

-- 
Damien MERENNE   <dam / cosinux.org>
http://blog.cosinux.org/