diff --git a/Cargo.lock b/Cargo.lock index 2e6bf4f..6b05a07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,6 +76,20 @@ dependencies = [ "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "garbage" +version = "0.1.1" +dependencies = [ + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "heck" version = "0.3.1" @@ -262,20 +276,6 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "trash-cli" -version = "0.1.1" -dependencies = [ - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unicode-segmentation" version = "1.6.0" diff --git a/Cargo.toml b/Cargo.toml index 388f677..1515d3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "trash-cli" +name = "garbage" version = "0.1.1" authors = ["Michael Zhang "] edition = "2018" [[bin]] -name = "trash" +name = "garbage" path = "src/main.rs" [dependencies] diff --git a/README.md b/README.md index f7f0ac1..20abf55 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -trash-cli -========= +garbage +======= rust ver of trash-cli, basic functionality is in, code is probably shit @@ -9,14 +9,14 @@ Usage ----- ``` -$ trash put [-r] file1 file2 ... +$ garbage put [-r] file1 file2 ... -$ trash restore +$ garbage restore [..interactive] -$ trash list +$ garbage list -$ trash empty [days] +$ garbage empty [days] ``` About diff --git a/src/trashdir.rs b/src/dir.rs similarity index 98% rename from src/trashdir.rs rename to src/dir.rs index acfcd45..7e7e662 100644 --- a/src/trashdir.rs +++ b/src/dir.rs @@ -4,7 +4,7 @@ use std::path::PathBuf; use walkdir::{DirEntry, WalkDir}; use crate::errors::Error; -use crate::trashinfo::TrashInfo; +use crate::info::TrashInfo; use crate::XDG; #[derive(Debug)] diff --git a/src/trashinfo.rs b/src/info.rs similarity index 100% rename from src/trashinfo.rs rename to src/info.rs diff --git a/src/main.rs b/src/main.rs index 54270d9..144f416 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,8 +5,8 @@ extern crate log; mod errors; mod ops; -mod trashdir; -mod trashinfo; +mod dir; +mod info; use std::fs; use std::io; @@ -16,7 +16,7 @@ use structopt::StructOpt; use xdg::BaseDirectories; use crate::errors::Error; -use crate::trashdir::TrashDir; +use crate::dir::TrashDir; lazy_static! { static ref XDG: BaseDirectories = BaseDirectories::new().unwrap(); diff --git a/src/ops.rs b/src/ops.rs index 9b4999d..c618b37 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -4,8 +4,8 @@ use std::path::Path; use chrono::{Duration, Local}; use crate::errors::Error; -use crate::trashdir::TrashDir; -use crate::trashinfo::TrashInfo; +use crate::dir::TrashDir; +use crate::info::TrashInfo; pub fn empty(dry: bool, days: Option) -> Result<(), Error> { let home_trash = TrashDir::get_home_trash();