junk_file

Crates.iojunk_file
lib.rsjunk_file
version0.1.1
sourcesrc
created_at2023-08-12 12:48:07.01884
updated_at2023-08-12 13:50:00.349814
descriptionThe library helps you detect commonly generated junk files like `.DS_Store` or `Thumbs.db`.
homepage
repositoryhttps://github.com/amachang/junk_file
max_upload_size
id942723
size31,133
Hitoshi Amano (amachang)

documentation

README

GitHub Workflow Status (with event) Codecov docs.rs Crates.io Crates.io

junk_file: Detect Common Junk Files

This library helps you detect commonly generated junk files like .DS_Store or Thumbs.db.

Features

  1. Detect common junk files such as .DS_Store and Thumbs.db.
  2. Auto-update: Uses GitHub Actions to automatically reflect changes from the original node junk project within a week.

If you discover new junk files, please consider reporting to the original junk project.

Examples

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

Commit count: 18

cargo fmt