Skip to main content
rename - fs/promises - Node documentation
function rename

Usage in Deno

import { rename } from "node:fs/promises";
rename(
oldPath: PathLike,
newPath: PathLike,
): Promise<void>

Renames oldPath to newPath.

Parameters

oldPath: PathLike
newPath: PathLike

Return Type

Promise<void>

Fulfills with undefined upon success.

Back to top