Struct self_update::Move
[−]
[src]
pub struct Move<'a> { /* fields omitted */ }
Moves a file from the given path to the specified destination.
If replace_using_temp
is provided, the destination file will be
replaced using the given temp path as a backup.
- Errors:
- Io - copying / renaming
Methods
impl<'a> Move<'a>
[src]
fn from_source(source: &'a Path) -> Move<'a>
Specify source file
fn replace_using_temp(&mut self, temp: &'a Path) -> &mut Self
If specified and the destination file already exists, the destination
file will be "safely" replaced using a temp path.
The temp
dir should must be explicitly provided since replace
operations require
files to live on the same filesystem.
fn to_dest(&self, dest: &Path) -> Result<()>
Move source file to specified destination