DedupeConfig

Struct DedupeConfig 

Source
pub struct DedupeConfig {
Show 13 fields pub dry_run: bool, pub output: Option<PathBuf>, pub modified_before: Option<DateTime<FixedOffset>>, pub rf_over: Option<usize>, pub name_patterns: Vec<Pattern>, pub path_patterns: Vec<Pattern>, pub priority: Vec<Priority>, pub keep_name_patterns: Vec<Pattern>, pub keep_path_patterns: Vec<Pattern>, pub isolated_roots: Vec<Path>, pub match_links: bool, pub no_lock: bool, pub no_check_size: bool,
}
Expand description

Configures which files should be removed

Fields§

§dry_run: bool

Don’t perform any changes on the file-system, but writes a log of file operations to the standard output.

§output: Option<PathBuf>

Write the dry_run report to a file instead of the standard output.

§modified_before: Option<DateTime<FixedOffset>>

Deduplicate only the files that were modified before the given time.

If any of the files in a group was modified later, the whole group is skipped.

§rf_over: Option<usize>

Keep at least n replicas untouched.

If not given, it is assumed to be the same as the --rf-over value in the earlier fclones group run.

§name_patterns: Vec<Pattern>

Restrict the set of files that can be removed or replaced by links to files with the name matching any given patterns.

§path_patterns: Vec<Pattern>

Restrict the set of files that can be removed or replaced by links to files with the path matching any given patterns.

§priority: Vec<Priority>

Set the priority for files to be removed or replaced by links.

§keep_name_patterns: Vec<Pattern>

Keep files with names matching any given patterns untouched.

§keep_path_patterns: Vec<Pattern>

Keep files with paths matching any given patterns untouched.

§isolated_roots: Vec<Path>

Specify a list of path prefixes. If non-empty, all duplicates having the same path prefix (root) are treated as one. This also means that the files sharing the same root can be either all dropped or all retained.

By default, it is set to the input paths given as arguments to the earlier fclones group command, if --isolate option was present.

§match_links: bool

Treat files reachable from multiple paths through links as duplicates.

§no_lock: bool

Don’t lock files before performing an action on them.

§no_check_size: bool

Allow the size of a file to be different than the size recorded during grouping.

By default, files are checked for size to prevent accidentally removing a file that was modified since grouping. However, if --transform was used when grouping, the data sizes recorded in the fclones group report likely don’t match the on-disk sizes of the files. Therefore, this flag is set automatically if --transform was used.

Trait Implementations§

Source§

impl Args for DedupeConfig

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 Debug for DedupeConfig

Source§

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

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

impl Default for DedupeConfig

Source§

fn default() -> DedupeConfig

Returns the “default value” for a type. Read more
Source§

impl FromArgMatches for DedupeConfig

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.

Auto Trait Implementations§

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> 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, 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