From: John Maclean Date: 2006-01-28T22:40:40+09:00 Subject: Re: working with file types and directories Yesss!!! Thanks :) Dir.foreach(".") {|x| puts FileTest.size(x) } Dir.foreach(".") {|x| puts FileTest.zero?(x) } # checks for empty files. also I'm (finally) getting to grips with using ri. On Sat, 28 Jan 2006 21:47:11 +0900 Alexis Reigel wrote: > > > Thanks for that reply. I guess that the only way to check that files > > are non-empty is to open them, read them and cound the lines, huh? > > --> FileTest.zero?("file") > Returns true if file is of zero length. > > > On > > Sat, 28 Jan 2006 14:56:21 +0900 Joel VanderWerf > > wrote: > > > > > >>Dir.foreach(".") {|x| puts File.ftype x } > > > > > > > -- John Maclean MSc (DIC) 07739 171 531