W3cubDocs

/Rust

Function rename

pub fn rename<P: AsRef<Path>, U: AsRef<Path>>(
    old_fd: &File,
    old_path: P,
    new_fd: &File,
    new_path: U,
) -> Result<()>
🔬This is a nightly-only experimental API. (wasi_ext #71213)
Available on WASI only.

Renames a file or directory.

This corresponds to the path_rename syscall.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/os/wasi/fs/fn.rename.html