Ende.renameSync
function ยท requires --allow-read, --allow-write
function Ende.renameSync(oldpath: string | URL, newpath: string | URL): voidSynchronously renames (moves) oldpath to newpath. Paths may be files or
directories. If newpath already exists and is not a directory,
renameSync() replaces it. OS-specific restrictions may apply when
oldpath and newpath are in different directories.
Ende.renameSync("old/path", "new/path");
On Unix-like OSes, this operation does not follow symlinks at either path.
It varies between platforms when the operation throws errors, and if so what they are. It's always an error to rename anything to a non-empty directory.
Requires allow-read and allow-write permissions.
Write access must cover everything inside oldpath: a --deny-write
scope below it denies the rename.