Sha256: 0a9d11d546fcfa500018ec6dd188c9060aaa1daf1eccec63ab219d62764c5ae6
Contents?: true
Size: 516 Bytes
Versions: 20
Compression:
Stored size: 516 Bytes
Contents
use crate::fs::asyncify; use std::io; use std::path::Path; /// 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`]. pub async fn rename(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()> { let from = from.as_ref().to_owned(); let to = to.as_ref().to_owned(); asyncify(move || std::fs::rename(from, to)).await }
Version data entries
20 entries across 20 versions & 1 rubygems