API reference
Preparing search index…

FileInputStream

Seekable asynchronous file input that reads directly into caller buffers.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory7

Constructors

Methods

Constructors

Methods

  • Replaces the current file; an I/O failure leaves the stream closed.

    Parameters

    filename
    string

    Returns

    Promise<boolean>
    Source & inheritance
  • Read asynchronously into data and advance the position; return the byte count, 0n at EOF, or undefined on failure or if not open.

    Parameters

    data
    Uint8Array

    Returns

    Promise<undefined | bigint>
    Source & inheritance
  • Set the absolute byte position (0 to 2^53−1) in operation order and return the new position; return undefined if not open.

    Parameters

    position
    bigint

    Returns

    Promise<undefined | bigint>
    Source & inheritance
  • Wait for earlier operations, then return the current byte position; return undefined if not open.

    Returns

    Promise<undefined | bigint>
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0