pub struct CscArgs {Show 47 fields
pub paths: Vec<PathBuf>,
pub resume: Option<PathBuf>,
pub journal_path: Option<PathBuf>,
pub state_dir: Option<PathBuf>,
pub verbose: bool,
pub progress: bool,
pub no_progress: bool,
pub verify_after: bool,
pub no_verify_after: bool,
pub overwrite: bool,
pub on_source_change: SourceChangePolicy,
pub copy_specials_as_specials: bool,
pub copy_block_devices_as_regular_files: bool,
pub copy_fifos_as_regular_files: bool,
pub one_file_system: bool,
pub best_effort_metadata: bool,
pub allow_unknown_fs: bool,
pub check_atime: bool,
pub check_ctime: bool,
pub check_birthtime: bool,
pub strict: bool,
pub delete_manifest_after: bool,
pub recursive: bool,
pub archive: bool,
pub dry_run: bool,
pub read_apple_double: Option<AppleDoubleStyle>,
pub read_apple_double_alongside: bool,
pub no_read_apple_double_alongside: bool,
pub read_apple_double_zip: bool,
pub read_apple_double_netatalk: bool,
pub read_apple_single: bool,
pub read_apple_single_without_extension: bool,
pub no_read_apple_single: bool,
pub read_apple_single_with_extension: Vec<AppleSingleExtension>,
pub maybe_write_apple_double: Option<AppleDoubleStyle>,
pub force_write_apple_double: Option<AppleDoubleStyle>,
pub maybe_write_apple_single: bool,
pub force_write_apple_single: bool,
pub write_apple_single_with_extension: Option<AppleSingleExtension>,
pub write_apple_single_without_extension: bool,
pub read_windows_ads: bool,
pub no_read_windows_ads: bool,
pub maybe_write_windows_ads: bool,
pub force_write_windows_ads: bool,
pub full_provenance: bool,
pub continue_on_error: bool,
pub allow_journal_errors: bool,
}Expand description
Command-line arguments for csc (checksummed copy).
Fields§
§paths: Vec<PathBuf>Source path(s) and destination path. If resuming, paths are restored from the state file.
resume: Option<PathBuf>Path to a state file (.cscjournal or .cscdesc) from which to resume an interrupted run. When specified, source and destination paths should not be passed.
journal_path: Option<PathBuf>Explicit path for the state journal file (.cscjournal).
state_dir: Option<PathBuf>Directory in which to store state files (default: user’s home folder).
verbose: boolVerbose output showing each file copied and verified.
progress: boolDisplay real-time progress indicators (default: enabled when standard error is connected to an interactive terminal).
no_progress: boolDisable progress display unconditionally.
verify_after: boolRecalculate checksums after flushing OS caches (default: enabled).
no_verify_after: boolSkip the post-flush verification pass.
overwrite: boolAuthorize replacing existing entries and restoring directory metadata. Existing entries are refused by default, including during resume.
on_source_change: SourceChangePolicyBehavior when a source file is modified during copy.
copy_specials_as_specials: boolRecreate special files (FIFOs, device nodes) faithfully as special nodes. Default is to skip special files.
copy_block_devices_as_regular_files: boolCopy block devices by reading their data and creating regular files.
copy_fifos_as_regular_files: boolCopy FIFOs (named pipes) by reading their content and creating regular files.
one_file_system: boolStay on the current filesystem and do not cross mount boundaries.
best_effort_metadata: boolRelax strict metadata requirements when writing to target filesystem. Permits unprivileged copies (skips root-only chown/flags failures) and tolerates up to 2 seconds of timestamp precision loss (e.g. FAT/SMB).
allow_unknown_fs: boolAllow operation even if the filesystem type cannot be detected.
check_atime: boolExplicitly check access time (atime) differences in post-copy verification.
check_ctime: boolExplicitly check status/metadata change time (ctime) differences in post-copy verification.
check_birthtime: boolRequire birth-time equality even on platforms unable to restore it.
strict: boolEnforce strictest verification settings, enabling –check-atime and –check-ctime in post-copy verification.
delete_manifest_after: boolDelete state journal (.cscjournal) and descriptor (.cscdesc) upon successful completion.
recursive: boolRecursive copy (default for csc; accepted for cp compatibility).
archive: boolArchive mode (preserves metadata, symlinks, and recurses; default for csc; accepted for cp compatibility).
dry_run: boolPerform a dry run without copying or modifying destination files.
read_apple_double: Option<AppleDoubleStyle>Read AppleDouble companion files and join them into file entities.
Defaults to alongside style if passed without a style.
read_apple_double_alongside: boolRead alongside (._
no_read_apple_double_alongside: boolDisable reading alongside (._
read_apple_double_zip: boolRead __MACOSX/ directory AppleDouble companion files.
read_apple_double_netatalk: boolRead Netatalk .AppleDouble companion files.
read_apple_single: boolRead AppleSingle files and decode data fork, resource fork, and Apple metadata.
read_apple_single_without_extension: boolRead bare AppleSingle files without extension (alias for –read-apple-single).
no_read_apple_single: boolDisable reading bare AppleSingle files without extension.
read_apple_single_with_extension: Vec<AppleSingleExtension>Read AppleSingle files with the specified extension (‘as’ or ‘asf’), automatically stripping the extension upon successful decode. May be specified multiple times to support multiple extensions.
maybe_write_apple_double: Option<AppleDoubleStyle>Write AppleDouble companion files if native filesystem streams or Apple metadata cannot be preserved.
Defaults to alongside style if passed without a style.
force_write_apple_double: Option<AppleDoubleStyle>Force writing AppleDouble companion files even if native streams are supported.
Defaults to alongside style if passed without a style.
maybe_write_apple_single: boolWrite AppleSingle archive files if native filesystem streams or Apple metadata cannot be preserved.
force_write_apple_single: boolForce writing destination files as AppleSingle archives.
write_apple_single_with_extension: Option<AppleSingleExtension>Write AppleSingle archive files with specified extension: ‘as’ or ‘asf’.
write_apple_single_without_extension: boolWrite AppleSingle archive files without extension (default).
read_windows_ads: boolRead alongside <filename>:<stream_name> Windows alternate data stream companion files.
no_read_windows_ads: boolDisable reading alongside <filename>:<stream_name> Windows alternate data stream companion files.
maybe_write_windows_ads: boolWrite alongside <filename>:<stream_name> Windows alternate data stream companion files if native streams cannot be preserved.
force_write_windows_ads: boolForce writing attached streams as alongside <filename>:<stream_name> Windows alternate data stream companion files.
full_provenance: boolRecord full provenance environment information using slow environment detection (e.g. network discovery for public IP addresses and server time synchronization).
continue_on_error: boolContinue copying remaining files when an item cannot be read, copied, or materialized. Errors are logged into the journal and descriptor instead of aborting the operation.
allow_journal_errors: boolAllow forgiving projection when reading state journals containing syntax or schema errors.
Implementations§
Source§impl CscArgs
impl CscArgs
Sourcepub const fn journal_projection_policy(&self) -> DcProjectionPolicy
pub const fn journal_projection_policy(&self) -> DcProjectionPolicy
Returns the projection policy to use when decoding state journals.
Sourcepub fn should_show_progress(&self) -> bool
pub fn should_show_progress(&self) -> bool
Resolves whether progress display is active.
Respects --no-progress (disabled) and --progress (forced enabled),
falling back to whether standard error is connected to an interactive
terminal.
Sourcepub fn should_verify_after(&self) -> bool
pub fn should_verify_after(&self) -> bool
Resolves whether post-flush verification is active.
Sourcepub fn should_check_atime(&self) -> bool
pub fn should_check_atime(&self) -> bool
Resolves whether access time checking is active in post-copy verification.
Sourcepub fn should_check_ctime(&self) -> bool
pub fn should_check_ctime(&self) -> bool
Resolves whether metadata change time checking is active in post-copy verification.
Sourcepub fn should_check_birthtime(&self) -> bool
pub fn should_check_birthtime(&self) -> bool
Whether birth-time fidelity is required on the destination.
Sourcepub fn resolve_apple_read_options(&self) -> AppleReadOptions
pub fn resolve_apple_read_options(&self) -> AppleReadOptions
Resolves AppleSingle / AppleDouble / Windows ADS companion read options.
Sourcepub fn resolve_apple_write_mode(
&self,
) -> Result<(AppleWriteMode, AppleSingleExtension)>
pub fn resolve_apple_write_mode( &self, ) -> Result<(AppleWriteMode, AppleSingleExtension)>
Resolves AppleSingle / AppleDouble / Windows ADS write mode, ensuring mutual exclusivity.
Trait Implementations§
Source§impl Args for CscArgs
impl Args for CscArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for CscArgs
impl FromArgMatches for CscArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for CscArgs
impl Parser for CscArgs
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for CscArgs
impl RefUnwindSafe for CscArgs
impl Send for CscArgs
impl Sync for CscArgs
impl Unpin for CscArgs
impl UnwindSafe for CscArgs
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
fn exact_from(value: T) -> U
§impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
fn exact_into(self) -> U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);