I/O - Deno documentation

Classes

c
Deno.Buffer

A variable-sized buffer of bytes with read() and write() methods.

Enums

E
Deno.SeekMode

A enum which defines the seek mode for IO related APIs that support seeking.

Functions

f
Deno.consoleSize

Gets the size of the console as columns/rows.

f
Deno.inspect

Converts the input into a string that has the same format as printed by console.log().

f
Deno.close

Close the given resource ID (rid) which has been previously opened, such as via opening or creating a file. Closing a file when you are finished with it is important to avoid leaking resources.

f
Deno.copy

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.

f
Deno.isatty

Check if a given resource id (rid) is a TTY (a terminal).

f
Deno.iter

Turns a Reader, r, into an async iterator.

f
Deno.iterSync

Turns a ReaderSync, r, into an iterator.

f
Deno.read

Read from a resource ID (rid) into an array buffer (buffer).

f
Deno.readAll

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

f
Deno.readAllSync

Synchronously reads Reader r until EOF (null) and returns the content as Uint8Array.

f
Deno.readSync

Synchronously read from a resource ID (rid) into an array buffer (buffer).

f
Deno.seek

Seek a resource ID (rid) to the given offset under mode given by whence. The call resolves to the new position within the resource (bytes from the start).

f
Deno.seekSync

Synchronously seek a resource ID (rid) to the given offset under mode given by whence. The new position within the resource (bytes from the start) is returned.

f
Deno.write

Write to the resource ID (rid) the contents of the array buffer (data).

f
Deno.writeAll

Write all the content of the array buffer (arr) to the writer (w).

f
Deno.writeAllSync

Synchronously write all the content of the array buffer (arr) to the writer (w).

f
Deno.writeSync

Synchronously write to the resource ID (rid) the contents of the array buffer (data).

Interfaces

I
Deno.InspectOptions

Option which can be specified when performing Deno.inspect.

I
Deno.Seeker

An abstract interface which when implemented provides an interface to seek within an open file/resource asynchronously.

I
Deno.SeekerSync

An abstract interface which when implemented provides an interface to seek within an open file/resource synchronously.

I
Deno.SetRawOptions
No documentation available
I
Deno.Closer

An abstract interface which when implemented provides an interface to close files/resources that were previously opened.

I
Deno.Reader

An abstract interface which when implemented provides an interface to read bytes into an array buffer asynchronously.

I
Deno.ReaderSync

An abstract interface which when implemented provides an interface to read bytes into an array buffer synchronously.

I
Deno.Writer

An abstract interface which when implemented provides an interface to write bytes from an array buffer to a file/resource asynchronously.

I
Deno.WriterSync

An abstract interface which when implemented provides an interface to write bytes from an array buffer to a file/resource synchronously.

Variables

v
Deno.stderr

A reference to stderr which can be used to write directly to stderr. It implements the Deno specific Writer, WriterSync, and Closer interfaces as well as provides a WritableStream interface.

v
Deno.stdin

A reference to stdin which can be used to read directly from stdin. It implements the Deno specific Reader, ReaderSync, and Closer interfaces as well as provides a ReadableStream interface.

v
Deno.stdout

A reference to stdout which can be used to write directly to stdout. It implements the Deno specific Writer, WriterSync, and Closer interfaces as well as provides a WritableStream interface.

v
Deno.customInspect

A symbol which can be used as a key for a custom method which will be called when Deno.inspect() is called, or when the object is logged to the console.