Spec-Zone.ru › Tokio

Function rename

pub async fn rename(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<()>
Available on crate feature fs only.

Renames 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.

MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/fs/fn.rename.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API