Skip to content
This repository was archived by the owner on Apr 9, 2023. It is now read-only.

Commit 6a5d4d7

Browse files
committed
Turns out cli flag is needed on stable. Updated README.
1 parent 639883e commit 6a5d4d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ tree_magic is a Rust crate that determines the MIME type a given file or byte st
44

55
Read the documentation at https://docs.rs/tree_magic/
66

7+
`stable` users: You may need to include the `cli` feature flag, even if you're using it as a library! (This is fixed on `nightly`)
8+
79
Unlike the typical approach that libmagic and file(1) uses, this loads all the file types in a tree based on subclasses. (EX: `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (MS Office 2007) subclasses `application/zip` which subclasses `application/octet-stream`) Then, instead of checking the file against *every* file type, it can traverse down the tree and only check the file types that make sense to check. (After all, the fastest check is the check that never gets run.)
810

911
This library also provides the ability to check if a file is a certain type without going through the process of checking it against every file type.

0 commit comments

Comments
 (0)