6#ifndef _ZFI_ZFFile_file_h_
7#define _ZFI_ZFFile_file_h_
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
_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 zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
ZFSeekPos
seek position similar to SEEK_SET of FILE operation
Definition ZFCoreTypeDef_OtherType.h:47
zfbool ZFFileMove(const zfchar *srcPath, const zfchar *dstPath, zfbool isForce=(_ZFT_t_zftrue))
move a file or directory from srcPath to dstPath
void * ZFFileOpen(const zfchar *filePath, ZFFileOpenOptionFlags flag=(v_ZFFileOpenOption::e_Read), zfbool autoCreateParent=(_ZFT_t_zftrue))
open a file for read or write
zfbool ZFFileCopy(const zfchar *srcPath, const zfchar *dstPath, zfbool isRecursive=(_ZFT_t_zftrue), zfbool isForce=(_ZFT_t_zftrue))
copy a file or directory from srcPath to dstPath
zfbool ZFFileClose(void *token)
close and save the file if need, return false if save failed
zfbool ZFPathCreate(const zfchar *path, zfbool autoMakeParent=(_ZFT_t_zftrue))
make directory
void ZFFileFindClose(ZFFileFindData &fd)
zfbool ZFFileIsExist(const zfchar *path)
return true if file specified by path is exist
zfbool ZFFileFindFirst(ZFFileFindData &fd, const zfchar *path)
find file or directory, similar to FindFirstFile under Windows
zfbool ZFFileSeek(void *token, zfindex byteSize, ZFSeekPos position=(ZFSeekPosBegin))
similar to fseek, return false if seek out of range
zfbool ZFFileIsEof(void *token)
see ZFFileRead
zfindex ZFFileWrite(void *token, const void *src, zfindex maxByteSize=(((zfindex) -1)))
write file, see ZFFileRead
zfbool ZFFileIsDir(const zfchar *path)
return true if file specified by path is a directory
void ZFFileFlush(void *token)
flush the file, useful only for files opened for write
zfindex ZFFileRead(void *token, void *buf, zfindex maxByteSize)
read file
zfindex ZFFileSize(void *token)
util method to get file's total size (not left size)
zfindex ZFFileTell(void *token)
get current file's position or zfindexMax() if error
zfbool ZFFileIsError(void *token)
see ZFFileRead
zfbool ZFFileFindNext(ZFFileFindData &fd)
zfbool ZFFileRemove(const zfchar *path, zfbool isRecursive=(_ZFT_t_zftrue), zfbool isForce=(_ZFT_t_zftrue))
delete a file or directory from srcPath to dstPath
#define ZFMP_IN_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:117
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_DECLARE_3(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:910
#define ZFMETHOD_FUNC_DECLARE_4(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:1065
#define ZFMETHOD_FUNC_DECLARE_1(ZFLIB_, ReturnType, MethodName, ZFMP_0)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:624
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
data used by ZFFile when finding files
Definition ZFFile_fwd.h:53
see v_ZFFileOpenOption, ZFFileOpenOptionFlagsToString, ZFFileOpenOptionFlagsFromString
Definition ZFFile_fwd.h:44
open falgs, similar to fopen's flags, while we have binary mode only
Definition ZFFile_fwd.h:34