Introduced in 1.9, it’s a cool method to know if a directory exists:
Dir.exist?("/tmp") # => true
Dir.exist?("/temp") # => false
A more correct alias is Dir.exist?.
Jan 02 2011
Jan 02 2011
Introduced in 1.9, it’s a cool method to know if a directory exists:
Dir.exist?("/tmp") # => true
Dir.exist?("/temp") # => false
A more correct alias is Dir.exist?.