For the complete documentation index, see llms.txt. This page is also available as Markdown.

File.stream

File.stream([{ startByte, endByte, signal }]) → ReadableStream<Uint8Array>

Returns a ReadableStream of the file's contents (or a range of them). Nothing is requested until the stream is read, and an interrupted download automatically resumes where it left off.

Parameters:

startByte : number, default 0 The first byte to read.

endByte : number, optional The last byte to read (inclusive). Defaults to the end of the file.

signal : AbortSignal, optional

Returns: ReadableStream<Uint8Array>

Was this helpful?