module Magic

Extended Modules

Defined in:

libmagic/regex.cr
libmagic/file.cr
libmagic/magic.cr
type_checker.cr
magic.cr

Constant Summary

VERSION = "0.1.0"

Instance Method Summary

Instance Method Detail

def filetype #

Get the filetype of the given File object, filepath, file descriptor, or byte stream (IO) as a plain, human-readable string.


[View source]
def mime_type #

Get the mime-type of the given File object, filepath, file descriptor, or byte stream (IO). This is the easiest to use if you're comparing the filetypes of several files.


[View source]