Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pepsighan/mime-detective
Detects the mime-type of a file using magic numbers
https://github.com/pepsighan/mime-detective
mime-types rust
Last synced: 4 days ago
JSON representation
Detects the mime-type of a file using magic numbers
- Host: GitHub
- URL: https://github.com/pepsighan/mime-detective
- Owner: pepsighan
- License: mit
- Created: 2017-11-29T12:44:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-20T08:25:04.000Z (almost 5 years ago)
- Last Synced: 2024-04-25T21:04:46.668Z (7 months ago)
- Topics: mime-types, rust
- Language: Rust
- Size: 321 KB
- Stars: 5
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
### MimeDetective
The `MimeDetective` spies for the magic number of a file or buffer
and spits out strongly typed Mimes.#### Example
```rust
extern crate mime_detective;
use mime_detective::MimeDetective;let detective = MimeDetective::new().unwrap();
let mime = detective.detect_filepath("Cargo.toml").unwrap();
```