Is it a directory or a file : directory « File Directory « Ruby






Is it a directory or a file


File.directory? directory_name                 # => true
File.directory? filename                       # => false

 

Related examples in the same category

1.find out if it is a directory with directory?: