Skip to content

Commit

Permalink
prepare for cargo publish
Browse files Browse the repository at this point in the history
  • Loading branch information
amachang committed Aug 12, 2023
1 parent 4194c0e commit 93f0b64
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
name = "junk_file"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "The library helps you detect commonly generated junk files like `.DS_Store` or `Thumbs.db`."
license = "MIT OR Apache-2.0"
repository = "https://github.com/amachang/junk_file"
keywords = ["junk", "junk_file", "sindresorhus", "DS_Store", "AppleDouble", "LSOverride", "Icon", "_", "underscore", "Spotlight-V100", "Trashes", "__MACOSX", "tilde", "Thumbs.db", "ehthumbs.db", "Desktop.ini", "desktop.ini", "npm-debug.log", "swp", "@eaDir" ]
categories = ["filesystem"]

[dependencies]
lazy_static = "1.4.0"
Expand Down
24 changes: 24 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
//!
//! 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](https://github.com/sindresorhus/junk) within a week.
//!
//! If you discover new junk files, please consider reporting to the [original junk project](https://github.com/sindresorhus/junk).
//!
//! # Examples
//!
//! ```rust
//! 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);
//!
//! ```

use regex::Regex;
use lazy_static::lazy_static;
use std::ffi::OsStr;
Expand Down

0 comments on commit 93f0b64

Please sign in to comment.