From: Dido Sevilla Date: 2006-07-31T12:40:52+09:00 Subject: Re: Proof if a File exsists On 7/31/06, Jonathan Heinen wrote: > Hi, > > I want to proof if a File exsist. I just realize this by > > if(Dir.glob(file).length == 0) > > But I think there should be a better possibiliti like File.exsists?(file) Actually it's File.exist?(file). There's a whole slew of these file tests, such as File.directory?, File.readable?, File.writable? and so on. Have a look at the documentation here: http://www.ruby-doc.org/core/classes/FileTest.html