fsIORead
The fsIORead function is used to read data from a file.
Syntax
FsIOErr fsIORead(
FsIOFile file,
char* outBuffer,
int byteOffset,
int byteToRead,
FsIOFileReadCallback callback,
void* pUserData
);
Members
Parameters | Description |
---|---|
file |
This is the ID of a previously opened file, as returned by the fsIOOpen function. |
outBuffer |
This is a pointer to a previously created buffer which will store the data being read. It needs to be allocated and must be large enough to contains the whole file or the byteToRead bytes (if not set to -1). |
byteOffset |
This is the offset into the file from which data will be read. If this is not null then byteToRead must not be set to -1. |
byteToRead |
This defines the number of bytes to read from the file. If set to -1, the entire file will be read. |
callback |
Callback (FsIOFileReadCallback ) that is sent when the read operation is finished. |
pUserData |
Pointer given to the callback to identify the function call. |
Return Values
The function returns one of the FsIOErr
codes.
Remarks
This function is non-blocking: it will not wait for the file to be read to pass to the next line of code.