fs.rename

fs.rename

fs.rename

Function

Rename the current path to the target path.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
toStringYesNoneThe destination path.

Return value

TypeDescription
FsReturns the fs object bound to the new path.

Example

Notes

  • This method moves or renames the underlying file system path.