Skip to main content
renameSync - node__fs.d.ts - Node documentation
function renameSync

Usage in Deno

```typescript import { renameSync } from "node:node__fs.d.ts"; ```
renameSync(
oldPath: PathLike,
newPath: PathLike,
): void
Renames the file from `oldPath` to `newPath`. Returns `undefined`. See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.

Parameters

oldPath: PathLike
newPath: PathLike

Return Type

void