Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/deno.ts>copy

A modern runtime for JavaScript and TypeScript.
Go to Latest
function copy
import { copy } from "https://deno.land/x/deno@v0.28.0/cli/js/deno.ts";

Copies from src to dst until either EOF is reached on src or an error occurs. It returns the number of bytes copied and the first error encountered while copying, if any.

Because copy() is defined to read from src until EOF, it does not treat an EOF from read() as an error to be reported.

Returns

Promise<number>