From: Fleck Jean-Julien Date: 2010-01-09T16:56:07+09:00 Subject: Re: File and Dir class problems Hello Spencer, 2010/1/8 Spencer Rogers : > Thanks to both of you, those are all good points. It looks like I will > be able to do this without building my own function for it. And that was > a good catch with the glob.  If I wanted, how would I return a list of > files going down to the nth sub-directory with glob? The problem with glob is that it doesn't by default show the so-called "hidden" files (which on Unix-like system have a name beginning with a dot). If you want absolutely all the files, you should use the 'entries' method of a Dir object that get you the same result as a 'ls -a', but then you also get '.' (the current working directory) and '..' (the parent directory) which you usually would want to get rid of. >> d = Dir.new(Dir.pwd) => # >> d.entries => [".", "..", ".DS_Store", "config.yaml", "MD5SUM", "MD5SUM_OLD", "metainfo.yaml", "mise_a_jour_site_web_mpsi.rb", "output", "README", "src", "truc"] Cheers, -- JJ Fleck PCSI1 Lycée Kléber