Registry / utility / tree-magic-mini

tree-magic-mini

JSON →
library3.2.2rscratesunverified

Determines the MIME type of a file by traversing a filetype tree.

# Cargo.toml [dependencies] tree_magic_mini = "3.2.2"
INSTALL
IMPORT
SIG · TREE-MAGIC-MINI
T
tree-magic-mini
utilityrustv3.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from_filepath
✓ use tree_magic_mini::from_filepath;

Gets the MIME type of a file by its path.

use tree_magic_mini::from_filepath; fn main() { let mime = from_filepath("/path/to/file.txt").unwrap_or("application/octet-stream"); println!("MIME type: {}", mime); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.2.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
tree-magic-mini — cargo add tree-magic-mini · libregistry