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.

    • Optionalposition: 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

      The number is the number of bytes read

    Returns void