MagikaEx (magika_ex v0.1.3)

Copy Markdown

Provides the main interface for using Magika to identify the content type of files or binary data.

This module offers functions that wrap the Magika engine and allow you to classify file contents in an efficient and convenient way.

Summary

Functions

Identify the data type of raw bytes.

Identify the data type of a file given its path.

Returns the name of the Magika model currently in use.

Functions

identify_bytes(data)

@spec identify_bytes(binary()) :: {:ok, MagikaEx.Result.t()} | {:error, term()}

Identify the data type of raw bytes.

identify_path(path)

@spec identify_path(String.t()) :: {:ok, MagikaEx.Result.t()} | {:error, term()}

Identify the data type of a file given its path.

model_name()

@spec model_name() :: String.t()

Returns the name of the Magika model currently in use.