Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
Checking If a File Exists : exist « File Directory « Ruby
Ruby
File Directory
exist
Checking If a File Exists
puts
"It exists!"
if
File.exist?(
"file1.txt"
)
Related examples in the same category
1.
Create class to wrap File.exist and File.new method
2.
Checking to See if a File Exists
3.
Check to see if a dicectory exists