Skip to content

Rename a file

The fs.rename function is used to rename a file.

This is more like the mv command in Unix-like systems.

The first argument is a string of the source file path, and the second argument is a string of the destination file path.

nv,