Synchronously renames (moves)
newpath. Paths may be files or
newpath already exists and is not a directory,
renameSync() replaces it. OS-specific restrictions may apply when
newpath are in different directories.
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.