Cli

Struct Cli 

Source
pub struct Cli {
Show 31 fields pub directories: Vec<PathBuf>, pub target: Option<PathBuf>, pub deduplicate: bool, pub delete: bool, pub move_to: Option<PathBuf>, pub log: bool, pub log_file: Option<PathBuf>, pub output: Option<PathBuf>, pub format: String, pub algorithm: String, pub parallel: Option<usize>, pub mode: String, pub interactive: bool, pub verbose: u8, pub include: Vec<String>, pub exclude: Vec<String>, pub filter_from: Option<PathBuf>, pub progress: bool, pub progress_tui: bool, pub sort_by: SortCriterion, pub sort_order: SortOrder, pub raw_sizes: bool, pub config_file: Option<PathBuf>, pub dry_run: bool, pub cache_location: Option<PathBuf>, pub fast_mode: bool, pub media_mode: bool, pub media_resolution: String, pub media_formats: Vec<String>, pub media_similarity: u32, pub media_dedup_options: MediaDedupOptions,
}

Fields§

§directories: Vec<PathBuf>

The directories to scan for duplicate or missing files. When multiple directories are specified, the last one is treated as the target for copying missing files, unless –target is specified.

§target: Option<PathBuf>

Specifies the target directory for copying missing files or deduplication. Overrides the default behavior of using the last specified directory as target.

§deduplicate: bool

Whether to deduplicate between source and target directories instead of just copying missing files.

§delete: bool

Automatically delete duplicate files.

§move_to: Option<PathBuf>

Move duplicate files to the specified folder.

§log: bool

Write actions and errors to a log file.

§log_file: Option<PathBuf>

Specify a custom log file path.

§output: Option<PathBuf>

Write a file containing duplicate information.

§format: String

Output format for the duplicates file.

§algorithm: String

Hashing algorithm to use for comparing files.

§parallel: Option<usize>

Number of parallel threads to use for hashing. Defaults to auto-detected number of cores.

§mode: String

Mode for selecting which file to keep/delete in non-interactive mode.

§interactive: bool

Fire up interactive TUI mode.

§verbose: u8

Verbosity level.

§include: Vec<String>

Include files matching the given glob pattern. Can be specified multiple times.

§exclude: Vec<String>

Exclude files matching the given glob pattern. Can be specified multiple times.

§filter_from: Option<PathBuf>

Read filter rules from a file (similar to rclone filter files).

§progress: bool

Show progress information during scanning/hashing.

§progress_tui: bool§sort_by: SortCriterion§sort_order: SortOrder§raw_sizes: bool

Display file sizes in raw bytes instead of human-readable format.

§config_file: Option<PathBuf>

Path to a custom config file. If provided, overrides the default ~/.deduprc file.

§dry_run: bool

Run in dry run mode - simulate actions without making actual changes.

§cache_location: Option<PathBuf>

Directory to store hash cache for faster scanning of previously scanned files

§fast_mode: bool

Use cached hashes for files that haven’t changed since last scan

§media_mode: bool

Enable media deduplication (images, videos, audio)

§media_resolution: String

Resolution preference for media deduplication

§media_formats: Vec<String>

Format preference for media files (comma-separated, highest priority first)

§media_similarity: u32

Similarity threshold for media deduplication (0-100)

§media_dedup_options: MediaDedupOptions

Media deduplication options (will be populated from above arguments)

Implementations§

Source§

impl Cli

Source

pub fn with_config() -> Result<Self>

Apply configuration values from .deduprc to CLI arguments

Trait Implementations§

Source§

impl Args for Cli

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for Cli

Source§

fn clone(&self) -> Cli

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CommandFactory for Cli

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for Cli

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Cli

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Cli

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Cli

§

impl RefUnwindSafe for Cli

§

impl Send for Cli

§

impl Sync for Cli

§

impl Unpin for Cli

§

impl UnwindSafe for Cli

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V