The oldPath and newPath parameters can be WHATWG URL objects using file: protocol. Support is currently still experimental.
oldPath
newPath
URL
file:
新增于: v0.1.21
将文件从 oldPath 重命名为 newPath。返回 undefined。
undefined
【Renames the file from oldPath to newPath. Returns undefined.】
有关更多详细信息,请参阅 POSIX rename(2) 文档。
rename(2)
【See the POSIX rename(2) documentation for more details.】