[][src]Struct dircpy::DirCopy

pub struct DirCopy {
    pub source: PathBuf,
    pub destination: PathBuf,
    // some fields omitted
}

Recursively copy a directory from a to b.

Fields

source: PathBuf

The source directory

destination: PathBuf

the destination directory

Implementations

impl DirCopy[src]

pub fn new(source: &Path, destination: &Path) -> DirCopy[src]

pub fn overwrite(self, overwrite: bool) -> DirCopy[src]

Overwrite target files (off by default)

pub fn overwrite_if_newer(self, overwrite_only_newer: bool) -> DirCopy[src]

Overwrite if the source is newer (off by default)

pub fn overwrite_if_size_differs(
    self,
    overwrite_if_size_differs: bool
) -> DirCopy
[src]

Overwrite if size between source and dest differs (off by default)

pub fn with_exclude_filter(self, f: &str) -> DirCopy[src]

Do not copy files that contain this string

pub fn with_include_filter(self, f: &str) -> DirCopy[src]

Only copy files that contain this string.

pub fn build(&self) -> Result<(), Error>[src]

Execute the copy operation

Trait Implementations

impl Clone for DirCopy[src]

impl Debug for DirCopy[src]

Auto Trait Implementations

impl RefUnwindSafe for DirCopy

impl Send for DirCopy

impl Sync for DirCopy

impl Unpin for DirCopy

impl UnwindSafe for DirCopy

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.