From: Sascha Abel Date: 2009-02-05T18:54:24+09:00 Subject: Re: Return actual files only not directories, using Pathname.. Gregory Brown wrote: > On Thu, Feb 5, 2009 at 1:50 AM, Brian Wallace > wrote: > >> Does anyone have any tips on how I could use Pathname to return files only, >> and not directories? > > Use Pathname.glob > >>> require "pathname" > => true >>> Pathname.glob("lib/**/*.rb") You will have to be cautious with this one though, since a directory name may contain dots such as 'project.rb'. I guess it's highly unusual but I have seen this before ... -- Posted via http://www.ruby-forum.com/.