Crates.io | futilities |
lib.rs | futilities |
version | 0.1.5 |
source | src |
created_at | 2021-02-08 01:53:30.012454 |
updated_at | 2021-02-08 21:58:06.176517 |
description | File utilities, detects image files and elf format (linux executable). |
homepage | |
repository | https://github.com/MonkeyToiletLadder/futilities |
max_upload_size | |
id | 352153 |
size | 12,206 |
This crate provides basic file utilities. Detects image files (PNG, JPEG, SVG, XCF ...) by reading file headers or file information. Also detects ELF format (Linux executables).
[dependencies]
futilities = "0.1.5"
use std::path::Path;
use futilities::*;
fn main() {
// Use on Path PathBuf String and str
println!("{:?}", "cargo".is_elf());
println!("{:?}", Path::new("image.png").is_jpg());
println!("{:?}", String::new("image.bmp").is_bmp());
println!("{:?}", "image.svg".is_svg());
}
If you suspect that this library doesnt detect a certain file type correctly email me at dylan_w2014@outlook.com with the file type your trying to detect and the file. Or optionally if you think you know why it wouldnt be detected write why. Thank you.