nn::hio::CTR::HostFile::Read Member Function

Syntax

#include <nn/hio.h>
Result Read(
     size_t * pRead,
     void * buf,
     size_t size
);
s32 Read(
     void * buf,
     size_t size
);

List of Overloaded Member Functions

Read(size_t *, void *, size_t) Reads the specified amount of data from a file into a buffer, and returns the result of the operation.
Read(void *, size_t) Reads the specified amount of data from a file into a buffer, and returns the size of data (in bytes) that were actually read.

Description of Read(size_t *, void *, size_t)

Up to size bytes of data are read from the current file position and copied to the region at the address specified by buf.
The function stores the number of copied bytes in pRead and returns a nn::Result-type process result.

In the debugger environment, the portion in the read buffer after the returned position is undefined.
If there is a difference between the requested size and the read size, do not treat the values beyond the read size as if they were unmodified initialized values.

Description of Read(void *, size_t)

Up to size bytes of data are read from the current file position and copied to the region at the address specified by buf.
Returns the number of bytes that were copied.

In the debugger environment, the portion in the read buffer after the returned position is undefined.
If there is a difference between the requested size and the read size, do not treat the values beyond the read size as if they were unmodified initialized values.

CONFIDENTIAL