#junk #ds-store #ea-dir #swp #sindresorhus

junk_file

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

2 releases

0.1.1 Aug 12, 2023
0.1.0 Aug 12, 2023

#917 in Filesystem

Download history 40/week @ 2024-01-14 50/week @ 2024-01-21 15/week @ 2024-02-18 48/week @ 2024-02-25 5/week @ 2024-03-03 18/week @ 2024-03-10 1/week @ 2024-03-17 3/week @ 2024-03-24 49/week @ 2024-03-31 26/week @ 2024-04-07 9/week @ 2024-04-14

87 downloads per month
Used in 2 crates

MIT/Apache

14KB
254 lines

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

Dependencies

~2–3MB
~53K SLoC