Function tauri_sys::fs::rename_file
source · pub async fn rename_file(
old_path: &Path,
new_path: &Path,
dir: BaseDirectory,
) -> Result<(), Error>
Expand description
Renames a file.
§Example
use tauri_sys::fs;
fs::rename_file(old_path, new_path, BaseDirectory::Download).expect("could not rename file");
Requires allowlist > fs > renameFile
to be enabled.