Method: File.type

Defined in:
lib/magic/core/file.rb

.type(path) ⇒ Object

call-seq:

File.type( path ) -> string, array or nil

Returns

Example:

See also: File::magic and File::mime



73
74
75
# File 'lib/magic/core/file.rb', line 73

def type(path)
  magic(path, Magic::MIME_TYPE)
end