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