C4 Engine Terathon Software C4 Engine API Documentation

• File Manager

API Links
Developer Links

File::Read

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

FileResult Read(void *buffer, unsigned long 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 Read 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::Write