tfFSReadFile
Table of Contents >> Application Reference >> File System Interface
| #include <trsocket.h> |
| int tfFSReadFile | ( |
| void * userDataPtr, | |
| void * fileDataPtr, | |
| char * bufferPtr, | |
| int bufferSize | |
| ); |
Function Description
Given the unique user data pointer as returned by tfFSUserLogin() and a file data pointer as returned by tfFSOpenFile(), this function reads up to 'bufferSize' bytes into the buffer. It returns the number of bytes actually read, 0 if end of file has been reached, -1 on error.
Parameters
- userDataPtr
- Pointer to user data structure as returned by tfFSUserLogin().
- fileDataPtr
- Pointer to file data structure as returned by tfFSOpenFile().
- bufferPtr
- Pointer to buffer where to copy the data from the file.
- bufferSize
- Size in bytes of the buffer.
Returns
- >0
- Number of copied bytes.
- 0
- End of file.
- -1
- Failure.
Table of Contents >> Application Reference >> File System Interface