#db #github #regex #os #ds-store #thumbs #com-sindresorhus-junk

junk

Filter out OS junk files like .DS_Store and Thumbs.db. A Rust implementation of https://github.com/sindresorhus/junk

3 releases

0.1.2 Feb 1, 2020
0.1.1 Jan 29, 2020
0.1.0 Jan 28, 2020

#5 in #ds-store

MIT license

4KB

Junk

Filter out OS junk files like .DS_Store and Thumbs.db. A Rust implementation of https://github.com/sindresorhus/junk

API

use junk;

junk::is(&path);

Returns true if filename matches a junk file.

junk::not(&path);

Returns true if filename doesn't match a junk file.

junk::REGEX

Regex used for matching junk files.


lib.rs:

Filter out OS junk files like .DS_Store and Thumbs.db

Examples

use junk;

junk::is(".test.swp"); // Check if filename is junk.
junk::not(".test.swp"); // Check if filename is not junk.

Dependencies

~2.2–3MB
~54K SLoC