Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/files.ts

A modern runtime for JavaScript and TypeScript.
Go to Latest
import * as deno from "https://deno.land/x/deno@v0.30.0/cli/js/files.ts";

Classes

The Deno abstraction for reading and writing files.

Variables

An instance of File for stderr.

An instance of File for stdin.

An instance of File for stdout.

Functions

Close the file ID.

Creates a file if none exists or truncates an existing file and returns an instance of the File object.

Creates a file if none exists or truncates an existing file and returns an instance of the File object synchronously.

Open a file and return an instance of the File object.

Open a file and return an instance of the File object synchronously.

Read from a file ID into an array buffer.

Read synchronously from a file ID into an array buffer.

Seek a file ID to the given offset under mode given by whence.

Seek a file ID synchronously to the given offset under mode given by whence.

Write to the file ID the contents of the array buffer.

Write synchronously to the file ID the contents of the array buffer.