Skip to main content
renameSync - fs - Node documentation
function renameSync

Usage in Deno

import { renameSync } from "node:fs";
renameSync(
oldPath: PathLike,
newPath: PathLike,
): void

Renames the file from oldPath to newPath. Returns undefined.

See the POSIX rename(2) documentation for more details.

Parameters

oldPath: PathLike
newPath: PathLike

Return Type

void
Back to top