Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.FsFile

The Deno abstraction for reading and writing files.

class FsFile implements Reader, ReaderSync, Writer, WriterSync, Seeker, SeekerSync, Closer {
constructor(rid: number);
readonly readable: ReadableStream<Uint8Array>;
readonly rid: number;
readonly writable: WritableStream<Uint8Array>;
 
close(): void;
read(p: Uint8Array): Promise<number | null>;
readSync(p: Uint8Array): number | null;
seek(offset: number, whence: SeekMode): Promise<number>;
seekSync(offset: number, whence: SeekMode): number;
stat(): Promise<FileInfo>;
statSync(): FileInfo;
truncate(len?: number): Promise<void>;
truncateSync(len?: number): void;
write(p: Uint8Array): Promise<number>;
writeSync(p: Uint8Array): number;
}

§Implements

§Constructors

§
new FsFile(rid: number)
[src]

§Properties

§
readable: ReadableStream<Uint8Array>
[src]
§
rid: number
[src]
§
writable: WritableStream<Uint8Array>
[src]

§Methods

§
close(): void
[src]
§
read(p: Uint8Array): Promise<number | null>
[src]
§
readSync(p: Uint8Array): number | null
[src]
§
seek(offset: number, whence: SeekMode): Promise<number>
[src]
§
seekSync(offset: number, whence: SeekMode): number
[src]
§
stat(): Promise<FileInfo>
[src]
§
statSync(): FileInfo
[src]
§
truncate(len?: number): Promise<void>
[src]
§
truncateSync(len?: number): void
[src]
§
write(p: Uint8Array): Promise<number>
[src]
§
writeSync(p: Uint8Array): number
[src]