import { ReadStream } from "https://deno.land/std@0.170.0/node/internal/fs/streams.d.ts";
Instances of fs.ReadStream
are created and returned using the createReadStream function.
Properties
path: string | Buffer
The path to the file the stream is reading from as specified in the first
argument to fs.createReadStream()
. If path
is passed as a string, thenreadStream.path
will be a string. If path
is passed as a Buffer
, thenreadStream.path
will be a
Buffer
. If fd
is specified, thenreadStream.path
will be undefined
.
Methods
addListener(event: "close", listener: () => void): this
events.EventEmitter
- open
- close
- ready
addListener(event: "data", listener: (chunk: Buffer | string) => void): this
addListener(event: "end", listener: () => void): this
addListener(event: "error", listener: (err: Error) => void): this
addListener(event: "open", listener: (fd: number) => void): this
addListener(event: "pause", listener: () => void): this
addListener(event: "readable", listener: () => void): this
addListener(event: "ready", listener: () => void): this
addListener(event: "resume", listener: () => void): this
addListener(event: string | symbol, listener: (...args: any[]) => void): this
close(callback?: (err?: ErrnoException | null) => void): void
on(event: "close", listener: () => void): this
on(event: "end", listener: () => void): this
on(event: "error", listener: (err: Error) => void): this
on(event: "open", listener: (fd: number) => void): this
on(event: "pause", listener: () => void): this
on(event: "readable", listener: () => void): this
on(event: "ready", listener: () => void): this
on(event: "resume", listener: () => void): this
on(event: string | symbol, listener: (...args: any[]) => void): this
once(event: "close", listener: () => void): this
once(event: "end", listener: () => void): this
once(event: "error", listener: (err: Error) => void): this
once(event: "open", listener: (fd: number) => void): this
once(event: "pause", listener: () => void): this
once(event: "readable", listener: () => void): this
once(event: "ready", listener: () => void): this
once(event: "resume", listener: () => void): this
once(event: string | symbol, listener: (...args: any[]) => void): this
prependListener(event: "close", listener: () => void): this
prependListener(event: "data", listener: (chunk: Buffer | string) => void): this
prependListener(event: "end", listener: () => void): this
prependListener(event: "error", listener: (err: Error) => void): this
prependListener(event: "open", listener: (fd: number) => void): this
prependListener(event: "pause", listener: () => void): this
prependListener(event: "readable", listener: () => void): this
prependListener(event: "ready", listener: () => void): this
prependListener(event: "resume", listener: () => void): this
prependListener(event: string | symbol, listener: (...args: any[]) => void): this
prependOnceListener(event: "close", listener: () => void): this
prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this
prependOnceListener(event: "end", listener: () => void): this
prependOnceListener(event: "error", listener: (err: Error) => void): this
prependOnceListener(event: "open", listener: (fd: number) => void): this
prependOnceListener(event: "pause", listener: () => void): this
prependOnceListener(event: "readable", listener: () => void): this
prependOnceListener(event: "ready", listener: () => void): this
prependOnceListener(event: "resume", listener: () => void): this
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this