class ReadStream
extends stream.Readable
Instances of fs.ReadStream
are created and returned using the createReadStream function.
Properties Jump to heading
Jump to headingbytesRead: number
The number of bytes that have been read so far.
Jump to headingpath: 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
.
Jump to headingpending: boolean
This property is true
if the underlying file has not been opened yet,
i.e. before the 'ready'
event is emitted.
Methods Jump to heading
Jump to headingaddListener(event: "close",listener: () => void,): this
events.EventEmitter
- open
- close
- ready
Jump to headingaddListener(event: "data",listener: (chunk: Buffer | string) => void,): this
Jump to headingaddListener(event: "end",listener: () => void,): this
Jump to headingaddListener(event: "error",listener: (err: Error) => void,): this
Jump to headingaddListener(event: "open",listener: (fd: number) => void,): this
Jump to headingaddListener(event: "pause",listener: () => void,): this
Jump to headingaddListener(event: "readable",listener: () => void,): this
Jump to headingaddListener(event: "ready",listener: () => void,): this
Jump to headingaddListener(event: "resume",listener: () => void,): this
Jump to headingaddListener(event: string | symbol,listener: (...args: any[]) => void,): this
Jump to headingclose(callback?: (err?: ErrnoException | null) => void): void
Jump to headingon(event: "close",listener: () => void,): this
Jump to headingon(event: "data",listener: (chunk: Buffer | string) => void,): this
Jump to headingon(event: "end",listener: () => void,): this
Jump to headingon(event: "error",listener: (err: Error) => void,): this
Jump to headingon(event: "open",listener: (fd: number) => void,): this
Jump to headingon(event: "pause",listener: () => void,): this
Jump to headingon(event: "readable",listener: () => void,): this
Jump to headingon(event: "ready",listener: () => void,): this
Jump to headingon(event: "resume",listener: () => void,): this
Jump to headingon(event: string | symbol,listener: (...args: any[]) => void,): this
Jump to headingonce(event: "close",listener: () => void,): this
Jump to headingonce(event: "data",listener: (chunk: Buffer | string) => void,): this
Jump to headingonce(event: "end",listener: () => void,): this
Jump to headingonce(event: "error",listener: (err: Error) => void,): this
Jump to headingonce(event: "open",listener: (fd: number) => void,): this
Jump to headingonce(event: "pause",listener: () => void,): this
Jump to headingonce(event: "readable",listener: () => void,): this
Jump to headingonce(event: "ready",listener: () => void,): this
Jump to headingonce(event: "resume",listener: () => void,): this
Jump to headingonce(event: string | symbol,listener: (...args: any[]) => void,): this
Jump to headingprependListener(event: "close",listener: () => void,): this
Jump to headingprependListener(event: "data",listener: (chunk: Buffer | string) => void,): this
Jump to headingprependListener(event: "end",listener: () => void,): this
Jump to headingprependListener(event: "error",listener: (err: Error) => void,): this
Jump to headingprependListener(event: "open",listener: (fd: number) => void,): this
Jump to headingprependListener(event: "pause",listener: () => void,): this
Jump to headingprependListener(event: "readable",listener: () => void,): this
Jump to headingprependListener(event: "ready",listener: () => void,): this
Jump to headingprependListener(event: "resume",listener: () => void,): this
Jump to headingprependListener(event: string | symbol,listener: (...args: any[]) => void,): this
Jump to headingprependOnceListener(event: "close",listener: () => void,): this
Jump to headingprependOnceListener(event: "data",listener: (chunk: Buffer | string) => void,): this
Jump to headingprependOnceListener(event: "end",listener: () => void,): this
Jump to headingprependOnceListener(event: "error",listener: (err: Error) => void,): this
Jump to headingprependOnceListener(event: "open",listener: (fd: number) => void,): this
Jump to headingprependOnceListener(event: "pause",listener: () => void,): this
Jump to headingprependOnceListener(event: "readable",listener: () => void,): this
Jump to headingprependOnceListener(event: "ready",listener: () => void,): this
Jump to headingprependOnceListener(event: "resume",listener: () => void,): this
Jump to headingprependOnceListener(event: string | symbol,listener: (...args: any[]) => void,): this