pub fn copy_directory(
source_dir: impl AsRef<Path>,
destination_dir: impl AsRef<Path>,
) -> Result<PathBuf, Error>
Expand description
Copies the contents of the source directory to the given destination directory.
In destination_dir
, a new subdirectory with the basename of the source_dir
will be created.
It will not perform the copy operation if the effective destination directory does already exist.
The returned value will contain a copied directory’s path.