/** * cf_file.h */ #ifndef __CF_FILE_H__ #define __CF_FILE_H__ #include "cf_base.h" #include #define CF_ERROR_FILE_OPEN CF_ERROR_FILE - 1 #define CF_ERROR_FILE_INVALID_ARGS CF_ERROR_FILE - 2 #define CF_ERROR_FILE_READ CF_ERROR_FILE - 3 #define CF_ERROR_FILE_WRITE CF_ERROR_FILE - 4 #define CF_ERROR_FILE_CREATE CF_ERROR_FILE - 5 #define CF_ERROR_FILE_CLOSE CF_ERROR_FILE - 6 #define CF_ERROR_FILE_GET_SIZE CF_ERROR_FILE - 7 #ifdef __cplusplus extern "C" { #endif CF_EXPORT int CF_File_Open (const char * path, const int flag); CF_EXPORT int CF_File_Close (const int fd); CF_EXPORT int CF_File_Create (const char * path); CF_EXPORT int CF_File_Read (const int fd, void * buf, const size_t len); CF_EXPORT int CF_File_Write (const int fd, const void * buf, const size_t len); CF_EXPORT int CF_File_GetSize (const int fd); #ifdef __cplusplus } #endif #endif // #ifndef __CF_FILE_H__