pub enum DirectoryMoveStrategy {
Rename,
CopyAndDelete,
}Expand description
Describes a strategy usef when a directory move was performed.
This is included in DirectoryMoveFinished to allow
callers to understand how the directory was moved.
This is used only as a return value; if you want to control the
available directory move strategies, see DirectoryMoveAllowedStrategies
and the options described in move_directory / move_directory_with_progress.
Variants§
Rename
The source directory was simply renamed from the source path to the target path.
This is the fastest method, to the point of being near instantaneous, but generally works only if both paths are on the same mount point or drive.
CopyAndDelete
The source directory was recursively copied to the target directory, and the source directory was deleted afterwards.
This method is as fast as a normal recursive copy. It is also unavoidable if the directory can’t renamed, which can happen when the source and destination directory exist on different mount points or drives.
Trait Implementations§
Source§impl Clone for DirectoryMoveStrategy
impl Clone for DirectoryMoveStrategy
Source§fn clone(&self) -> DirectoryMoveStrategy
fn clone(&self) -> DirectoryMoveStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more