From: Paul Pladijs Date: 2001-03-05T07:13:48+09:00 Subject: [ruby-talk:11981] File exist method Is there a method or a simple way to check if some file exist? Something like: File.exist? ("myFileName") One solution to this problem is: ! Dir.entries (".").find { |a| a == "myFileName"}.nil? But it's not so handy when you are searching other directories. A second solution is opening the file and catching an exception if the file doesn't exist. Although it works I do not like it because you're violating the principles behind the proper use of exceptions? Regards, Paul.