Skip to content
instance method

File::Stat#directory?

() -> bool
stat.directory? → true or false

Returns true if stat is a directory, false otherwise.

Example
File.stat("testfile").directory?   #=> false
File.stat(".").directory?          #=> true