C4 Engine
C4 Engine API Documentation


Defined in:  C4Files.h
Reads data from a file.

FileResult ReadFile(void *buffer, uint32 size);

buffer A pointer to the location that will receive the data read from the file.
size The number of bytes to read from the file.
The ReadFile function attempts to perform a synchronous read operation for a file object. If successful, this function blocks until the read operation completes. The return value is one of the following file result codes.
kFileOkay The read operation was successfully completed.
kFileNotOpen No file has been opened for the File object.
kFileIOFailed The operation failed because the operating system returned an error.
See Also