File Inquiries : File.exists « File Directory « Ruby






File Inquiries


# tests whether a file exists before opening it

File::open("file.rb") if File::exists?( "file.rb" )

 

Related examples in the same category

1.Does a file exist