Interface FileHandle

A file handle returned by file.handle(). Can be used to read and write files in binary mode.

Hierarchy

  • FileHandle

Methods

  • Get the current offset of the file handle.

    Returns number

  • Seek to a given offset.

    Parameters

    • offset: number

      The offset to seek to.

    Returns void

  • Seek to the end of the file.

    Returns void

  • Read a given number of bytes from the current offset.

    Parameters

    • length: number

      The number of bytes to read.

    Returns Uint8Array

  • Read all bytes from the current offset to the end of the file.

    Returns Uint8Array

  • Write data to the file at the current offset.

    Parameters

    • data: string | number[] | Uint8Array

      The data to write.

    Returns void

  • Close the file handle.

    Returns void

Generated using TypeDoc