Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
libmagic-crystal
v0.1.0
Magic
Magic
Built with Crystal 1.9.2
2023-10-07 18:47:44 UTC
class
Magic::Magic
Magic::Magic
Reference
Object
Defined in:
magic/magic.cr
Constructors
.new
(flags : Int32 =
LibMagic
::
Flags
::
MIME
, db_path : String | Nil =
nil
)
Class Method Summary
.get_mime_type
(path : String)
Instance Method Summary
#close
#closed?
: Bool
#error
: String
#file
(path : String) : String
Constructor Detail
def self.
new
(flags : Int32 =
LibMagic
::
Flags
::
MIME
, db_path : String | Nil =
nil
)
#
[
View source
]
Class Method Detail
def self.
get_mime_type
(path : String)
#
[
View source
]
Instance Method Detail
def
close
#
[
View source
]
def
closed?
: Bool
#
[
View source
]
def
error
: String
#
[
View source
]
def
file
(path : String) : String
#
[
View source
]