Skip to main content
The Deno 2 Release Candidate is here
Learn more
function Rename
import { Rename } from "https://deno.land/x/macromania_assets@v0.2.0/deps.ts";

Renames (moves) oldpath to newpath. Paths may be files or directories. If newpath already exists and is not a directory, Rename replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.

See https://deno.land/api@v1.40.3?unstable=true&s=Deno.rename

Parameters

unnamed 0: { oldpath: string; newpath: string; }

Returns

The empty string.