summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/io/12_io.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/ext/io/12_io.js b/ext/io/12_io.js
index 6e95a9bca..1caf6fe06 100644
--- a/ext/io/12_io.js
+++ b/ext/io/12_io.js
@@ -20,7 +20,6 @@ import {
writableStreamForRid,
} from "ext:deno_web/06_streams.js";
-const DEFAULT_BUFFER_SIZE = 32 * 1024;
// Seek whence values.
// https://golang.org/pkg/io/#pkg-constants
const SeekMode = {
@@ -33,37 +32,6 @@ const SeekMode = {
End: 2,
};
-async function copy(
- src,
- dst,
- options,
-) {
- internals.warnOnDeprecatedApi(
- "Deno.copy()",
- new Error().stack,
- "Use `copy()` from `https://jsr.io/@std/io/doc/copy/~` instead.",
- );
- let n = 0;
- const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE;
- const b = new Uint8Array(bufSize);
- let gotEOF = false;
- while (gotEOF === false) {
- const result = await src.read(b);
- if (result === null) {
- gotEOF = true;
- } else {
- let nwritten = 0;
- while (nwritten < result) {
- nwritten += await dst.write(
- TypedArrayPrototypeSubarray(b, nwritten, result),
- );
- }
- n += nwritten;
- }
- }
- return n;
-}
-
function readSync(rid, buffer) {
if (buffer.length === 0) return 0;
const nread = core.readSync(rid, buffer);
@@ -295,7 +263,6 @@ const stdout = new Stdout();
const stderr = new Stderr();
export {
- copy,
read,
readAll,
readAllSync,