From: Rich Date: 2002-08-14T09:59:22+09:00 Subject: Re: Checking for file existance It's kinda hard to find - the FileTest object is what you're looking for The method 'exists?' can tell you if it exists... The method 'file?' can tell you if it's a file... The method 'directory?' can tell you if it's a directory... But I use returnedString = File.ftype ("nameOfFile_or_directory") Which returns strings like - ``file'', ``directory'', ``characterSpecial'', ``blockSpecial'', ``fifo'', ``link'', or ``socket''. (taken from the Ruby help files...) -Rich ----- Original Message ----- From: "Maur�cio" Newsgroups: gmane.comp.lang.ruby.general To: "ruby-talk ML" Sent: Tuesday, August 13, 2002 6:25 PM Subject: Checking for file existance > Hi, > > How do I check if a file (possibly a directory) exists? This is probably > easy, but I was not able to find it. > > Thanks, > Maur�cio > > > > > >