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

Usage in Deno

import { promises } from "node:fs";
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.