You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
895 B
55 lines
895 B
use super::*;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub enum RecursionMode
|
|
{
|
|
None,
|
|
All,
|
|
N(usize),
|
|
}
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub enum OperationMode
|
|
{
|
|
Print,
|
|
Delete,
|
|
}
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct Mode
|
|
{
|
|
pub error_mode: error::Mode,
|
|
pub recursion_mode: RecursionMode,
|
|
pub operation_mode: OperationMode,
|
|
pub logging_mode: log::Mode,
|
|
}
|
|
|
|
impl Default for Mode
|
|
{
|
|
fn default() -> Self
|
|
{
|
|
Self {
|
|
error_mode: error::Mode::Cancel,
|
|
recursion_mode: RecursionMode::None,
|
|
operation_mode: OperationMode::Print,
|
|
logging_mode: log::Mode::Warn,
|
|
}
|
|
}
|
|
}
|
|
|
|
pub const DEFAULT_HASHNAME: &'static str = ".rmdupe";
|
|
|
|
#[derive(Debug)]
|
|
pub struct Config
|
|
{
|
|
/// Paths to dupde-check
|
|
pub paths: Vec<String>,
|
|
/// operation mode
|
|
pub mode: Mode,
|
|
/// Save hashes to
|
|
pub save: Vec<String>,
|
|
/// Load hashes from
|
|
pub load: Vec<String>,
|
|
}
|