Crates.io | junk_file |
lib.rs | junk_file |
version | 0.1.1 |
source | src |
created_at | 2023-08-12 12:48:07.01884 |
updated_at | 2023-08-12 13:50:00.349814 |
description | The library helps you detect commonly generated junk files like `.DS_Store` or `Thumbs.db`. |
homepage | |
repository | https://github.com/amachang/junk_file |
max_upload_size | |
id | 942723 |
size | 31,133 |
This library helps you detect commonly generated junk files like .DS_Store
or Thumbs.db
.
.DS_Store
and Thumbs.db
.If you discover new junk files, please consider reporting to the original junk project.
use junk_file::*;
use std::ffi::OsString;
assert_eq!(is_junk("Thumbs.db"), true);
assert_eq!(is_junk(OsString::from(".DS_Store")), true); // also OsStr, OsString acceptable
assert_eq!(is_not_junk("filename.txt"), true);
assert_eq!(is_not_junk(OsString::from("filename.txt")), true);
License: MIT OR Apache-2.0