Skip to main content
Module

x/denoversion/lib/lib.deno_runtime.d.ts>deno.copyFile

Deno cli to manage and bump release versions.
Latest
function deno.copyFile
import { deno } from "https://deno.land/x/denoversion@v1.0.2/lib/lib.deno_runtime.d.ts";
const { copyFile } = deno;

Copies the contents of a file to another by name.

Creates a new file if target does not exists, and if target exists, overwrites original content of the target file.

It would also copy the permission of the original file to the destination.

  import { copyFile } from "deno";
  await copyFile("from.txt", "to.txt");

Parameters

from: string
to: string

Returns

Promise<void>