rename
This commit is contained in:
parent
2c2acd1203
commit
8d6e5eadc7
7 changed files with 28 additions and 28 deletions
28
Cargo.lock
generated
28
Cargo.lock
generated
|
@ -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"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
[package]
|
||||
name = "trash-cli"
|
||||
name = "garbage"
|
||||
version = "0.1.1"
|
||||
authors = ["Michael Zhang <iptq@protonmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[[bin]]
|
||||
name = "trash"
|
||||
name = "garbage"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
|
|
12
README.md
12
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
|
||||
|
|
|
@ -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)]
|
|
@ -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();
|
||||
|
|
|
@ -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<u32>) -> Result<(), Error> {
|
||||
let home_trash = TrashDir::get_home_trash();
|
||||
|
|
Loading…
Reference in a new issue