renameSync method Null safety
- String newPath
Synchronously rename this file. Return a File instance for the renamed file.
newPath must be absolute and normalized.
newPath identifies an existing file, that file is replaced.
newPath identifies an existing resource the operation might fail and
an exception is thrown.
File renameSync(String newPath);