6 releases (1 stable)
1.0.0 | Jan 20, 2020 |
---|---|
0.2.3 | Nov 12, 2019 |
0.2.2 | Jan 20, 2019 |
0.2.1 | Jun 25, 2018 |
0.1.2 | Apr 14, 2018 |
#27 in #magic
21 downloads per month
285KB
120 lines
MimeDetective
The MimeDetective
spies for the magic number of a file or buffer
and spits out strongly typed Mimes.
Example
extern crate mime_detective;
use mime_detective::MimeDetective;
let detective = MimeDetective::new().unwrap();
let mime = detective.detect_filepath("Cargo.toml").unwrap();
lib.rs
:
The MimeDetective
spies for the magic number of a file or buffer
and spits out strongly typed Mimes.
Example
use mime_detective::MimeDetective;
let detective = MimeDetective::new().unwrap();
let mime = detective.detect_filepath("Cargo.toml").unwrap();