pub enum CopyDirectoryExecutionError {
UnableToCreateDirectory {
directory_path: PathBuf,
error: Error,
},
UnableToAccessDestination {
path: PathBuf,
error: Error,
},
FileCopyError {
file_path: PathBuf,
error: FileError,
},
SymlinkCreationError {
symlink_path: PathBuf,
error: Error,
},
DestinationEntryUnexpected {
path: PathBuf,
},
}Expand description
Directory copy execution error.
Variants§
UnableToCreateDirectory
Failed to create a directory inside the destination folder.
For example, this can happen due to missing write permissions.
The inner std::io::Error will likely describe a more precise cause of this error.
Fields
UnableToAccessDestination
A file or directory inside the destination directory could not be accessed.
Fields
FileCopyError
An error occurred while trying to copy a file to the destination.
Fields
SymlinkCreationError
An error occurred while trying to create a symlink at the destination.
Fields
DestinationEntryUnexpected
A destination directory, a file, or a sub-directory inside it has changed since the preparation phase of the directory copy.
We can’t guarantee that all destination directory changes will trigger this, but some more obvious problematic ones, like a file appearing in one of the destinations we wanted to copy to, will.
This is essentially an unavoidable time-of-check time-of-use bug, but we try to catch it if possible.
The path field contains the path that already existed, causing this error.