ZFFramework
 
Loading...
Searching...
No Matches
ZFProtocolZFFile.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFProtocolZFFile_h_
7#define _ZFI_ZFProtocolZFFile_h_
8
9#include "ZFCore/ZFProtocol.h"
10#include "ZFCore/ZFFile.h"
12
17public:
25 virtual zfbool isDir(ZF_IN const zfchar *path) zfpurevirtual;
26
31 ZF_IN const zfchar *path
32 , ZF_IN_OPT zfbool autoMakeParent = zffalse
38 ZF_IN const zfchar *srcPath
39 , ZF_IN const zfchar *dstPath
40 , ZF_IN_OPT zfbool isRecursive = zftrue
41 , ZF_IN_OPT zfbool isForce = zftrue
47 ZF_IN const zfchar *srcPath
48 , ZF_IN const zfchar *dstPath
49 , ZF_IN_OPT zfbool isForce = zftrue
55 ZF_IN const zfchar *path
56 , ZF_IN_OPT zfbool isRecursive = zftrue
57 , ZF_IN_OPT zfbool isForce = zftrue
59
75 , ZF_IN const zfchar *path
85
87 virtual void *fileOpen(
88 ZF_IN const zfchar *filePath
92 virtual zfbool fileClose(ZF_IN void *token) zfpurevirtual;
93
95 virtual zfindex fileTell(ZF_IN void *token) zfpurevirtual;
98 ZF_IN void *token
99 , ZF_IN zfindex byteSize
100 , ZF_IN_OPT ZFSeekPos position = ZFSeekPosBegin
102
105 ZF_IN void *token
106 , ZF_IN void *buf
107 , ZF_IN zfindex maxByteSize
109
112 ZF_IN void *token
113 , ZF_IN const void *src
114 , ZF_IN zfindex maxByteSize
117 virtual void fileFlush(ZF_IN void *token) zfpurevirtual;
119 virtual zfbool fileIsEof(ZF_IN void *token) zfpurevirtual;
121 virtual zfbool fileIsError(ZF_IN void *token) zfpurevirtual;
123
125#endif // #ifndef _ZFI_ZFProtocolZFFile_h_
126
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define zfpurevirtual
dummy macro shows that a method is pure virtual method
Definition ZFCoreTypeDef_ClassType.h:68
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
#define zffalse
bool false type
Definition ZFCoreTypeDef_CoreType.h:111
ZFSeekPos
seek position similar to SEEK_SET of FILE operation
Definition ZFCoreTypeDef_OtherType.h:47
file utility
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
protocol definitions for ZFFramework
#define ZFPROTOCOL_INTERFACE_END(ModuleName)
for more information, please refer to ZFPROTOCOL_INTERFACE_BEGIN
Definition ZFProtocol.h:414
#define ZFPROTOCOL_INTERFACE_BEGIN(ZFLIB_, ModuleName)
declare a protocol interface for ZFFramework
Definition ZFProtocol.h:408
for impl to achieve custom find logic
Definition ZFFile_fwd.h:92
see v_ZFFileOpenOption, ZFFileOpenOptionFlagsToString, ZFFileOpenOptionFlagsFromString
Definition ZFFile_fwd.h:44
virtual zfindex fileRead(void *token, void *buf, zfindex maxByteSize)=0
see ZFFileRead
virtual zfbool isDir(const zfchar *path)=0
see ZFFileIsDir
virtual void fileFindClose(ZFFileFindData::Impl &fd)=0
see ZFFileFindClose, fileFindFirst
virtual zfindex fileWrite(void *token, const void *src, zfindex maxByteSize)=0
see ZFFileWrite
virtual zfbool fileMove(const zfchar *srcPath, const zfchar *dstPath, zfbool isForce=_ZFT_t_zftrue)=0
see ZFFileMove
virtual zfbool filePathCreate(const zfchar *path, zfbool autoMakeParent=_ZFT_t_zffalse)=0
see ZFPathCreate
virtual zfbool fileFindFirst(ZFFileFindData::Impl &fd, const zfchar *path)=0
see ZFFileFindFirst
virtual zfbool fileRemove(const zfchar *path, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)=0
see ZFFileRemove
virtual zfbool fileIsEof(void *token)=0
see ZFFileIsEof
virtual void fileFlush(void *token)=0
see ZFFileFlush
virtual zfbool fileSeek(void *token, zfindex byteSize, ZFSeekPos position=ZFSeekPosBegin)=0
see ZFFileSeek
virtual zfbool fileCopy(const zfchar *srcPath, const zfchar *dstPath, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)=0
see ZFFileCopy
virtual zfbool fileFindNext(ZFFileFindData::Impl &fd)=0
see ZFFileFindNext, fileFindFirst
virtual zfbool fileIsExist(const zfchar *path)=0
see ZFFileIsExist
virtual zfindex fileTell(void *token)=0
see ZFFileTell
virtual zfbool fileClose(void *token)=0
see ZFFileClose
virtual void * fileOpen(const zfchar *filePath, ZFFileOpenOptionFlags flag=v_ZFFileOpenOption::e_Read)=0
see ZFFileOpen
virtual zfbool fileIsError(void *token)=0
see ZFFileIsError
@ e_Read
Read(1 << 1)
Definition ZFFile_fwd.h:36