Function read

  • Read data from the file specified by fd.

    Parameters

    • fd: number
    • buffer: Uint8Array

      The buffer that the data will be written to.

    • offset: number

      The offset within the buffer where writing will start.

    • length: number

      An integer specifying the number of bytes to read.

    • Optional position: number

      An integer specifying where to begin reading from in the file. If position is null, data will be read from the current file position.

    • cb: Callback<[number, Uint8Array]> = nop

    Returns void