pub enum DirectoryCopyDepthLimit {
Unlimited,
Limited {
maximum_depth: usize,
},
}Expand description
The maximum depth of a directory copy operation.
Variants§
Unlimited
No depth limit - the entire directory tree will be copied.
Limited
Copy depth is limited to maximum_depth, where the value refers to
the maximum depth of the subdirectory whose contents are still copied.
§Examples
maximum_depth = 0 indicates a copy operation that will cover only the files and directories
directly in the source directory.
~/source-directory
|- foo.csv
|- foo-2.csv
|- bar/
(no entries)Note that the ~/source-directory/bar directory will still be created,
but the corresponding files inside it in the source directory won’t be copied.
maximum_depth = 1 will cover the files and directories directly in the source directory
plus one level of files and subdirectories deeper.
~/source-directory
|- foo.csv
|- foo-2.csv
|- bar/
|- hello-world.txt
|- bar2/
(no entries)Notice how direct contents of ~/source-directory and ~/source-directory/bar are copied,
but ~/source-directory/bar/bar2 is created, but stays empty on the destination.
Trait Implementations§
Source§impl Clone for DirectoryCopyDepthLimit
impl Clone for DirectoryCopyDepthLimit
Source§fn clone(&self) -> DirectoryCopyDepthLimit
fn clone(&self) -> DirectoryCopyDepthLimit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more