file_type
Getting Started
A file type. The file type is determined by examining the file or bytes against known file signatures and file extensions.
Additional information on PRONOM file types can be found at The National Archives
Example
Detect a Java class file from bytes:
use FileType;
let file_type = from_bytes;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
Detect text from bytes:
use FileType;
let file_type = from_bytes;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Safety
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
AND
The PRONOM definitions are provided by The National Archives (UK) under the Open Government Licence.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.