C4 Engine
C4 Engine API Documentation

File::ReadFile

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

FileResult ReadFile(void *buffer, uint32 size);

Parameters
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.
Description
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

File::WriteFile