tokio_fs_ext/fs/wasm/
rename.rs

1use std::{io, path::Path};
2
3use super::{copy, remove_file};
4
5pub async fn rename(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()> {
6    // TODO: rename dir
7    copy(&from, to).await?;
8    remove_file(from).await?;
9    Ok(())
10}