Skip to main content
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 supportseeking.

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 byconsole.log().

f
Deno.close

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

f
Deno.copy

Copies from src to dst until either EOF (null) is read from src oran error occurs. It resolves to the number of bytes copied or rejects withthe 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 asUint8Array`.

f
Deno.readAllSync

Synchronously reads Reader r until EOF (null) and returns the contentas 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 modegiven by whence. The new position within the resource (bytes from thestart) 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 thewriter (w).

f
Deno.writeSync

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

Interfaces

I
Deno.Seeker

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

I
Deno.SeekerSync

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

I
Deno.SetRawOptions
No documentation available
I
Deno.Closer

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

I
Deno.Reader

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

I
Deno.ReaderSync

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

I
Deno.Writer

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

I
Deno.WriterSync

An abstract interface which when implemented provides an interface to writebytes 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 aWritableStream 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 aReadableStream 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 aWritableStream interface.

v
Deno.customInspect

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