Function tokio::fs::rename

source ·
pub fn rename<P, Q>(from: P, to: Q) -> RenameFuture<P, Q>where
    P: AsRef<Path>,
    Q: AsRef<Path>,
Expand description

Rename a file or directory to a new name, replacing the original file if to already exists.

This will not work if the new name is on a different mount point.

This is an async version of std::fs::rename