@bitbeater/node-utils - v3.0.0
    Preparing search index...

    Function streamToFile

    • Streams data to a file, creating the file and necessary directories if they do not exist. The function handles backpressure by pausing the readable stream when the writable stream's internal buffer is full, and resuming it when the buffer is drained.

      Parameters

      • readableStream: ReadableStream<Uint8Array<ArrayBufferLike>>
      • filePath: string

      Returns Promise<number>