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 "../ZFIODef.h"
12
17public:
25 virtual zfbool isDir(ZF_IN const zfstring &path) zfpurevirtual;
35 , ZF_IN const zfstring &path
37
42 ZF_IN const zfstring &path
43 , ZF_IN_OPT zfbool autoCreateParent = zffalse
49 ZF_IN const zfstring &path
50 , ZF_IN_OPT zfbool isRecursive = zftrue
51 , ZF_IN_OPT zfbool isForce = zftrue
57 ZF_IN const zfstring &dstPath
58 , ZF_IN const zfstring &srcPath
59 , ZF_IN_OPT zfbool isForce = zftrue
69 ZF_IN const zfstring &path
70 , ZF_IN zftimet time
72
88 , ZF_IN const zfstring &path
98
100 virtual void *fileOpen(
101 ZF_IN const zfstring &filePath
105 virtual zfbool fileClose(ZF_IN void *token) zfpurevirtual;
106
108 virtual zfindex fileTell(ZF_IN void *token) zfpurevirtual;
111 ZF_IN void *token
112 , ZF_IN zfindex byteSize
113 , ZF_IN_OPT ZFSeekPos seekPos = ZFSeekPosBegin
115
118 ZF_IN void *token
119 , ZF_IN void *buf
120 , ZF_IN zfindex maxByteSize
122
125 ZF_IN void *token
126 , ZF_IN const void *src
127 , ZF_IN zfindex maxByteSize
130 virtual void fileFlush(ZF_IN void *token) zfpurevirtual;
132
134#endif // #ifndef _ZFI_ZFProtocolZFFile_h_
135
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#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:191
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:195
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:207
_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
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
#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
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
abstract IO
#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:412
#define ZFPROTOCOL_INTERFACE_BEGIN(ZFLIB_, ModuleName)
declare a protocol interface for ZFFramework
Definition ZFProtocol.h:406
for impl to achieve custom find logic
Definition ZFIODef_fwd.h:110
see v_ZFIOOpenOption, ZFIOOpenOptionFlagsToString, ZFIOOpenOptionFlagsFromString
Definition ZFIODef_fwd.h:49
virtual zfindex fileRead(void *token, void *buf, zfindex maxByteSize)=0
see ZFFileRead
virtual zfbool fileSeek(void *token, zfindex byteSize, ZFSeekPos seekPos=ZFSeekPosBegin)=0
see ZFFileSeek
virtual zfindex fileWrite(void *token, const void *src, zfindex maxByteSize)=0
see ZFFileWrite
virtual zfbool fileFindNext(ZFIOFindData::Impl &fd)=0
see ZFFileFindNext, fileFindFirst
virtual zfbool fileMove(const zfstring &dstPath, const zfstring &srcPath, zfbool isForce=_ZFT_t_zftrue)=0
see ZFFileMove
virtual zfbool fileModTime(const zfstring &path, zftimet time)=0
see ZFFileModTime
virtual zfbool isDir(const zfstring &path)=0
see ZFFileIsDir
virtual zfbool fileFindFirst(ZFIOFindData::Impl &fd, const zfstring &path)=0
see ZFFileFindFirst
virtual zftimet fileModTime(const zfstring &path)=0
see ZFFileModTime
virtual void * fileOpen(const zfstring &filePath, ZFIOOpenOptionFlags flags)=0
see ZFFileOpen
virtual void fileFindClose(ZFIOFindData::Impl &fd)=0
see ZFFileFindClose, fileFindFirst
virtual void fileFlush(void *token)=0
see ZFFileFlush
virtual zfbool filePathCreate(const zfstring &path, zfbool autoCreateParent=_ZFT_t_zffalse)=0
see ZFFilePathCreate
virtual zfbool isSymlink(const zfstring &path)=0
see ZFFileIsSymlink
virtual zfbool fileRemove(const zfstring &path, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)=0
see ZFFileRemove
virtual zfindex fileTell(void *token)=0
see ZFFileTell
virtual zfbool fileClose(void *token)=0
see ZFFileClose
virtual zfbool fileIsExist(const zfstring &path)=0
see ZFFileIsExist
virtual zfbool readSymlink(zfstring &ret, const zfstring &path)=0
see ZFFileReadSymlink