class File

Public Class Methods

file_type(file, *flags) click to toggle source
# File lib/filemagic/ext.rb, line 60
def self.file_type(file, *flags)
  FileMagic.fm(*flags).file(file.respond_to?(:path) ? file.path : file)
rescue FileMagic::FileMagicError
end