Skip to main content
Module

x/deno/js/io.ts>copy

A modern runtime for JavaScript and TypeScript.
Go to Latest
function copy
import { copy } from "https://deno.land/x/deno@v0.17.0/js/io.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>