Trait tfio::SingleFileOperation [−][src]
Trait that represents a single file operation
Required methods
fn get_path(&self) -> &Path
[src]
Returns path to source file
fn get_backup_path(&self) -> &Path
[src]
Returns path to backup file
Defaults to ""
fn set_backup_path<S: AsRef<Path>>(&mut self, uuid: S)
[src]
Sets the backup path
fn get_temp_dir(&self) -> &Path
[src]
Returns path to temp dir
Provided methods
fn dispose(&self) -> Result<()>
[src]
Dispose off resources used by the operation
It should be called inside Drop
fn create_backup_file(&mut self) -> Result<()>
[src]
Creates a backup of the source file
If backup file is successfully created, method should call set_backup_path