pub struct OperationExecutor {
pub default_resolution: Option<ConflictResolution>,
pub use_trash: bool,
}Expand description
Executor for file operations with unified interface.
Fields§
§default_resolution: Option<ConflictResolution>Default conflict resolution.
use_trash: boolWhether to use trash for deletions.
Implementations§
Source§impl OperationExecutor
impl OperationExecutor
Sourcepub fn with_trash() -> Self
pub fn with_trash() -> Self
Create an executor that uses trash for deletions.
Sourcepub fn with_resolution(self, resolution: ConflictResolution) -> Self
pub fn with_resolution(self, resolution: ConflictResolution) -> Self
Set the default conflict resolution.
Sourcepub fn copy(
&self,
sources: Vec<PathBuf>,
destination: PathBuf,
) -> Receiver<OperationResult>
pub fn copy( &self, sources: Vec<PathBuf>, destination: PathBuf, ) -> Receiver<OperationResult>
Execute a copy operation.
Sourcepub fn move_to(
&self,
sources: Vec<PathBuf>,
destination: PathBuf,
) -> Receiver<OperationResult>
pub fn move_to( &self, sources: Vec<PathBuf>, destination: PathBuf, ) -> Receiver<OperationResult>
Execute a move operation.
Sourcepub fn rename(
&self,
source: PathBuf,
new_name: String,
) -> Receiver<OperationResult>
pub fn rename( &self, source: PathBuf, new_name: String, ) -> Receiver<OperationResult>
Execute a rename operation.
Sourcepub fn create_file(&self, path: PathBuf) -> Receiver<OperationResult>
pub fn create_file(&self, path: PathBuf) -> Receiver<OperationResult>
Execute a file creation operation.
Sourcepub fn create_directory(&self, path: PathBuf) -> Receiver<OperationResult>
pub fn create_directory(&self, path: PathBuf) -> Receiver<OperationResult>
Execute a directory creation operation.
Trait Implementations§
Source§impl Debug for OperationExecutor
impl Debug for OperationExecutor
Source§impl Default for OperationExecutor
impl Default for OperationExecutor
Source§fn default() -> OperationExecutor
fn default() -> OperationExecutor
Returns the “default value” for a type. Read more