inquire about the type of a file with ftype : ftype « File Directory « Ruby






inquire about the type of a file with ftype


# The ftype method identifies the type of the file by returning one of the following: 
# file, directory, characterSpecial, blockSpecial, fifo, link, socket, or unknown.


File::ftype( "file.rb" ) # => "file"

 








Related examples in the same category

1.Get file type