method
exists?
v1_9_3_125 -
Show latest stable
- Class:
Dir
exists?(p1)public
?
Returns true if the named file is a directory, or a symlink that points at a directory, and false otherwise.
File.directory?(".")
1Note
Dir
The documentation is using File.directory?("/path/to/directory"), but the method being referred to is Dir.exists?().
Dir.exists?(".")
=> true
The source code is the same as File.directory?().