From: Brian Wallace Date: 2009-02-05T15:50:42+09:00 Subject: Return actual files only not directories, using Pathname.. --00c09f9870459f88970462265456 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I'm very new to Ruby, but I'm learning pretty quickly ..What i'm trying to do is fairly simple... I'd like to use Pathname, to return only actual filenames in the array... For instance , using FileList.. You can just do this: FileList["*.*"] And it will return a string array with the filenames without directories.. But I rather like Pathname ... Since I can use it like this: a = Pathname("/Path") b = a.children puts b[1] #==> "/Path/file1.txt" b[1].read #==> "This is data in a file named file1.txt" puts b[2] #==> "/Path/file2.txt" ..... Does anyone have any tips on how I could use Pathname to return files only, and not directories? Thanks, Brian --00c09f9870459f88970462265456--