pub enum DirectoryExecutionPlanError {
UnableToAccess {
path: PathBuf,
error: Error,
},
EntryEscapesSourceDirectory {
path: PathBuf,
},
DestinationItemAlreadyExists {
path: PathBuf,
},
SymbolicLinkIsBroken {
path: PathBuf,
},
}Expand description
Directory copy or move planning error.
Variants§
UnableToAccess
A source or destination directory, one of its sub-directories or a file in it (or its metadata) cannot be read.
For example, this can happen due to missing read permissions.
The inner std::io::Error will likely describe a more precise cause of this error.
Fields
EntryEscapesSourceDirectory
An item inside the source directory “escaped” outside of the base source directory.
§Implementation detail
This is an extremely unlikely error, because its requirement
is that std::fs::read_dir’s iterator returns a directory entry
outside the provided directory path.
Even though this seems extremely unlikely, a panic! would be
an extreme measure due to the many types of filesystems that exist.
Instead, treat this as a truly fatal error.
DestinationItemAlreadyExists
A destination directory or a file inside it already exists,
which is against the configured DestinationDirectoryRule.
This can also happen when we intended to copy a file to the destination, but a directory with the same name appeared mid-copy (an unavoidable time-of-check time-of-use bug).
The path field contains the path that already existed, causing this error.
SymbolicLinkIsBroken
A broken symbolic link has been encountered inside the source directory.
This error can occur only when broken_symlink_behaviour is set to
BrokenSymlinkBehaviour::Abort.