| 1 | #define CP_FILE_OPEN_ERROR 10000 |
| 2 | #define CP_FILE_CLOSE_ERROR 10001 |
| 3 | #define CP_FILE_EOF_ERROR 10002 |
| 4 | #define CP_FILE_READ_ERROR 10003 |
| 5 | #define CP_FILE_WRITE_ERROR 10004 |
| 6 | #define CP_FILE_POS_ERROR 10005 |
| 7 | |
| 8 | #define CP_FILE_REF FILE* |
| 9 | |
| 10 | int CPCreateFile(const char* fullFilePath, int overwrite, long macCreator, long macFileType); |
| 11 | int CPDeleteFile(const char* fullFilePath); |
| 12 | int CPOpenFile(const char* fullFilePath, int readOrWrite, CP_FILE_REF* fileRefPtr); |
| 13 | int CPCloseFile(CP_FILE_REF fileRef); |
| 14 | int CPReadFile(CP_FILE_REF fileRef, unsigned long count, void* buffer, unsigned long* numBytesReadPtr); |
| 15 | int CPReadFile2(CP_FILE_REF fileRef, unsigned long count, void* buffer, unsigned long* numBytesReadPtr); |
| 16 | int CPWriteFile(CP_FILE_REF fileRef, unsigned long count, const void* buffer, unsigned long* numBytesWrittenPtr); |
| 17 | int CPGetFilePosition(CP_FILE_REF fileRef, unsigned long* filePosPtr); |
| 18 | int CPSetFilePosition(CP_FILE_REF fileRef, long filePos, int mode); |
| 19 | int CPAtEndOfFile(CP_FILE_REF fileRef); |
| 20 | int CPNumberOfBytesInFile(CP_FILE_REF fileRef, unsigned long* numBytesPtr); |