ExMagic v0.0.3 ExMagic View Source
Binding to libmagic to gather information about a file.
Link to this section Summary
Functions
Retrieves magic information from the given buffer.
Retrieves magic information from the given buffer. Fails on an error.
Retrieves magic information from the given file.
Retrieves magic information from the given file. Fails on an error.
Returns the version of libmagic in use.
Link to this section Functions
Retrieves magic information from the given buffer.
Examples
iex> ExMagic.from_buffer("foo")
{:ok, "text/plain"}
Retrieves magic information from the given buffer. Fails on an error.
Examples
iex> ExMagic.from_buffer!("foo")
"text/plain"
Retrieves magic information from the given file.
Retrieves magic information from the given file. Fails on an error.
Returns the version of libmagic in use.
Examples
iex> ExMagic.version()
529