class method
Dir.exist?
(::path | ::io file_name) -> bool
Dir.exist?(dirpath) → true or false
dir.c
View on GitHub ↗
VALUE
rb_file_directory_p(void)
{
}
Returns whether dirpath is a directory in the underlying file system:
Example
Dir.exist?('/example') # => true Dir.exist?('/nosuch') # => false Dir.exist?('/example/main.rb') # => false
Same as File.directory?.