Utilities for working with Deno's readers, writers, and web streams.
Copies from src
to dst
until either EOF (null
) is read from src
or
an error occurs. It resolves to the number of bytes copied or rejects with
the first error encountered while copying.
Turns a Reader
into an async iterator.
Turns a ReaderSync
into an iterator.
Read Reader
r
until EOF (null
) and resolve to the content as
Uint8Array
.
Synchronously reads ReaderSync
r
until EOF (null
) and returns
the content as Uint8Array
.
Create a Reader
from a ReadableStreamDefaultReader
.
An abstract interface which when implemented provides an interface to read bytes into an array buffer synchronously.
An abstract interface which when implemented provides an interface to seek within an open file/resource synchronously.
A enum which defines the seek mode for IO related APIs that support seeking.
Create a ReadableStream
of Uint8Array
s from a
Reader
.
Create a WritableStream
from a Writer
.
Write all the content of the array buffer (arr
) to the writer (w
).
Synchronously write all the content of the array buffer (arr
) to the
writer (w
).
An abstract interface which when implemented provides an interface to write bytes from an array buffer to a file/resource synchronously.
Copies from src
to dst
until either EOF (null
) is read from src
or
an error occurs. It resolves to the number of bytes copied or rejects with
the first error encountered while copying.
Turns a Reader
into an async iterator.
Turns a ReaderSync
into an iterator.
An abstract interface which when implemented provides an interface to read bytes into an array buffer synchronously.
Read Reader
r
until EOF (null
) and resolve to the content as
Uint8Array
.
Synchronously reads ReaderSync
r
until EOF (null
) and returns
the content as Uint8Array
.
Create a Reader
from a ReadableStreamDefaultReader
.
Create a ReadableStream
of Uint8Array
s from a
Reader
.
Create a WritableStream
from a Writer
.
An abstract interface which when implemented provides an interface to read bytes into an array buffer synchronously.
An abstract interface which when implemented provides an interface to seek within an open file/resource synchronously.
A enum which defines the seek mode for IO related APIs that support seeking.
An abstract interface which when implemented provides an interface to write bytes from an array buffer to a file/resource synchronously.
Write all the content of the array buffer (arr
) to the writer (w
).
Synchronously write all the content of the array buffer (arr
) to the
writer (w
).