pub struct CopyOptions {
    pub overwrite: bool,
    pub skip_exist: bool,
    pub buffer_size: usize,
    pub copy_inside: bool,
    pub content_only: bool,
    pub depth: u64,
}
Expand description

Options and flags which can be used to configure how a file will be copied or moved.

Fields

overwrite: bool

Sets the option true for overwrite existing files.

skip_exist: bool

Sets the option true for skipe existing files.

buffer_size: usize

Sets buffer size for copy/move work only with receipt information about process work.

copy_inside: bool

Sets the option true for recursively copying a directory with a new name or place it inside the destination.(same behaviors like cp -r in Unix)

content_only: bool

Sets the option true, for copy only content without a created folder in the destination folder

depth: u64

Sets levels reading. Set 0 for read all directory folder. By default 0.

Warrning: Work only for copy operations!

Implementations

Initialize struct CopyOptions with default value.

overwrite: false

skip_exist: false

buffer_size: 64000 //64kb

copy_inside: false

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.