pub struct MoveFile { /* private fields */ }Expand description
Builder for move_file.
By default, parent directories are not created, existing files may be overwritten, backups are disabled, dry-run mode is disabled, and copy-delete fallback is disabled.
Implementations§
Source§impl MoveFile
impl MoveFile
Sourcepub fn create_parent_dirs(self, create_parent_dirs: bool) -> Self
pub fn create_parent_dirs(self, create_parent_dirs: bool) -> Self
Sets whether missing parent directories for the destination should be created.
Sourcepub fn overwrite(self, overwrite: bool) -> Self
pub fn overwrite(self, overwrite: bool) -> Self
Sets whether an existing destination file may be overwritten.
Sourcepub fn backup_existing(self, backup_existing: bool) -> Self
pub fn backup_existing(self, backup_existing: bool) -> Self
Sets whether an existing destination file should be backed up first.
Sourcepub fn backup_suffix(self, backup_suffix: impl Into<String>) -> Self
pub fn backup_suffix(self, backup_suffix: impl Into<String>) -> Self
Sets the suffix appended to the destination path for backups.
Sourcepub fn dry_run(self, dry_run: bool) -> Self
pub fn dry_run(self, dry_run: bool) -> Self
Sets whether the operation should validate policy but skip filesystem writes.
Sourcepub fn fallback_copy_delete(self, fallback_copy_delete: bool) -> Self
pub fn fallback_copy_delete(self, fallback_copy_delete: bool) -> Self
Sets whether rename failures may fall back to copy-then-delete.
Trait Implementations§
Auto Trait Implementations§
impl Forget for MoveFile
impl Freeze for MoveFile
impl Move for MoveFile
impl RefUnwindSafe for MoveFile
impl Send for MoveFile
impl Sync for MoveFile
impl Unpin for MoveFile
impl UnsafeUnpin for MoveFile
impl UnwindSafe for MoveFile
Blanket Implementations§
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
Mutably borrows from an owned value. Read more