~iptq/garbage

ref: 45fc4f1ee1bf4703e50eaed3e5f61ee06a7f6f81 garbage/src/lib.rs -rw-r--r-- 774 bytes
45fc4f1e — Michael Zhang add sourcehut build badge and remove deps.rs one 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! garbage

#![warn(missing_docs)]

#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate structopt;
extern crate log;
#[macro_use]
extern crate anyhow;
#[macro_use]
extern crate thiserror;

mod dir;
mod errors;
mod info;
mod mounts;
pub mod ops;
mod utils;

use std::path::PathBuf;

use xdg::BaseDirectories;

pub use crate::dir::TrashDir;
pub use crate::errors::Error;
pub use crate::info::TrashInfo;
use crate::mounts::Mounts;

lazy_static! {
    #[allow(missing_docs)]
    pub static ref MOUNTS: Mounts = Mounts::read().unwrap();
    static ref XDG: BaseDirectories = BaseDirectories::new().unwrap();
    static ref HOME_TRASH: TrashDir = TrashDir::get_home_trash();
    static ref HOME_MOUNT: PathBuf = MOUNTS.get_mount_point(HOME_TRASH.path()).unwrap();
}