Function copy_dir_recursive

Source
pub fn copy_dir_recursive(src: &Path, dst: &Path) -> Result<()>
Expand description

Recursively copies a directory and its contents to a destination.

This function creates the destination directory if it doesn’t exist and copies all files and subdirectories from the source to the destination.

§Arguments

  • src - Source directory path
  • dst - Destination directory path

§Errors

Returns an std::io::Error if:

  • creating the destination directory fails,
  • reading source directory entries fails,
  • inspecting entry types fails,
  • copying a file fails.