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

x/deno/cli/js/lib.deno_runtime.d.ts>Deno.File

A modern runtime for JavaScript and TypeScript.
Go to Latest
class Deno.File
import { Deno } from "https://deno.land/x/deno@v0.28.0/cli/js/lib.deno_runtime.d.ts";
const { File } = Deno;

The Deno abstraction for reading and writing files.

Constructors

new
File(rid: number)

Properties

readonly
rid: number

Methods

close(): void
read(p: Uint8Array): Promise<number | EOF>
readSync(p: Uint8Array): number | EOF
seek(offset: number, whence: SeekMode): Promise<void>
seekSync(offset: number, whence: SeekMode): void
write(p: Uint8Array): Promise<number>
writeSync(p: Uint8Array): number