ZFFramework
 
Loading...
Searching...
No Matches
ZFFile_pathInfo.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFFile_pathInfo_h_
7#define _ZFI_ZFFile_pathInfo_h_
8
9#include "ZFFile_fwd.h"
11
12// ============================================================
14typedef zfbool (*ZFPathInfoCallbackIsExist)(ZF_IN const zfchar *pathData);
16typedef zfbool (*ZFPathInfoCallbackIsDir)(ZF_IN const zfchar *pathData);
20 , ZF_IN const zfchar *pathData
21 );
25 , ZF_IN const zfchar *pathData
26 , ZF_IN const zfchar *childName
27 );
31 , ZF_IN const zfchar *pathData
32 );
35 ZF_IN const zfchar *pathData
36 , ZF_IN_OPT zfbool autoMakeParent /* = zftrue */
37 );
40 ZF_IN const zfchar *pathData
41 , ZF_IN_OPT zfbool isRecursive /* = zftrue */
42 , ZF_IN_OPT zfbool isForce /* = zftrue */
43 );
46 ZF_IN const zfchar *pathDataFrom
47 , ZF_IN const zfchar *pathDataTo
48 , ZF_IN_OPT zfbool isForce /* = zftrue */
49 );
53 , ZF_IN const zfchar *pathData
54 );
60typedef void *(*ZFPathInfoCallbackOpen)(
61 ZF_IN const zfchar *pathData
62 , ZF_IN_OPT ZFFileOpenOptionFlags flag /* = v_ZFFileOpenOption::e_Read */
63 , ZF_IN_OPT zfbool autoCreateParent /* = zftrue */
64 );
66typedef zfbool (*ZFPathInfoCallbackClose)(ZF_IN void *token);
68typedef zfindex (*ZFPathInfoCallbackSize)(ZF_IN void *token);
70typedef zfindex (*ZFPathInfoCallbackTell)(ZF_IN void *token);
73 ZF_IN void *token
74 , ZF_IN zfindex byteSize
75 , ZF_IN_OPT ZFSeekPos position /* = ZFSeekPosBegin */
76 );
79 ZF_IN void *token
80 , ZF_IN void *buf
81 , ZF_IN zfindex maxByteSize
82 );
85 ZF_IN void *token
86 , ZF_IN const void *src
87 , ZF_IN_OPT zfindex maxByteSize /* = zfindexMax() */
88 );
89
90// ============================================================
98 , ZF_IN const zfchar *pathData
99 );
103 , ZF_IN const zfchar *pathData
104 , ZF_IN const zfchar *childName
105 );
109 , ZF_IN const zfchar *pathData
110 );
113 ZF_IN const zfchar *pathData
114 , ZF_IN_OPT zfbool autoMakeParent = zftrue
115 );
118 ZF_IN const zfchar *pathData
119 , ZF_IN_OPT zfbool isRecursive = zftrue
120 , ZF_IN_OPT zfbool isForce = zftrue
121 );
124 ZF_IN const zfchar *pathDataFrom
125 , ZF_IN const zfchar *pathDataTo
126 , ZF_IN_OPT zfbool isForce = zftrue
127 );
131 , ZF_IN const zfchar *pathData
132 );
139 ZF_IN const zfchar *pathData
141 , ZF_IN_OPT zfbool autoCreateParent = zftrue
142 );
151 ZF_IN void *token
152 , ZF_IN zfindex byteSize
153 , ZF_IN_OPT ZFSeekPos position = ZFSeekPosBegin
154 );
157 ZF_IN void *token
158 , ZF_IN void *buf
159 , ZF_IN zfindex maxByteSize
160 );
163 ZF_IN void *token
164 , ZF_IN const void *src
165 , ZF_IN_OPT zfindex maxByteSize = zfindexMax()
166 );
167
168// ============================================================
171 , ZFMP_IN(const ZFPathInfo &, pathInfo)
175 , ZFMP_IN(const ZFPathInfo &, pathInfo)
179 , ZFMP_IN_OUT(zfstring &, ret)
180 , ZFMP_IN(const ZFPathInfo &, pathInfo)
184 , ZFMP_IN_OUT(zfstring &, ret)
185 , ZFMP_IN(const ZFPathInfo &, pathInfo)
186 , ZFMP_IN(const zfchar *, childName)
190 , ZFMP_IN_OUT(zfstring &, ret)
191 , ZFMP_IN(const ZFPathInfo &, pathInfo)
195 , ZFMP_IN(const ZFPathInfo &, pathInfo)
196 , ZFMP_IN_OPT(zfbool, autoMakeParent, zftrue)
200 , ZFMP_IN(const ZFPathInfo &, pathInfo)
201 , ZFMP_IN_OPT(zfbool, isRecursive, zftrue)
202 , ZFMP_IN_OPT(zfbool, isForce, zftrue)
206 , ZFMP_IN(const ZFPathInfo &, pathInfoFrom)
207 , ZFMP_IN(const zfchar *, pathDataTo)
208 , ZFMP_IN_OPT(zfbool, isForce, zftrue)
212 , ZFMP_IN(const ZFPathInfo &, pathInfo)
217 , ZFMP_IN(const ZFPathInfo &, pathInfo)
222 , ZFMP_IN(const ZFPathInfo &, pathInfo)
227 , ZFMP_IN(const ZFPathInfo &, pathInfo)
229 , ZFMP_IN_OPT(zfbool, autoCreateParent, zftrue)
233 , ZFMP_IN(const ZFPathInfo &, pathInfo)
234 , ZFMP_IN(void *, token)
238 , ZFMP_IN(const ZFPathInfo &, pathInfo)
239 , ZFMP_IN(void *, token)
243 , ZFMP_IN(const ZFPathInfo &, pathInfo)
244 , ZFMP_IN(void *, token)
248 , ZFMP_IN(const ZFPathInfo &, pathInfo)
249 , ZFMP_IN(void *, token)
250 , ZFMP_IN(zfindex, byteSize)
251 , ZFMP_IN_OPT(ZFSeekPos, position, ZFSeekPosBegin)
255 , ZFMP_IN(const ZFPathInfo &, pathInfo)
256 , ZFMP_IN(void *, token)
257 , ZFMP_IN(void *, buf)
258 , ZFMP_IN(zfindex, maxByteSize)
262 , ZFMP_IN(const ZFPathInfo &, pathInfo)
263 , ZFMP_IN(void *, token)
264 , ZFMP_IN(const void *, src)
265 , ZFMP_IN_OPT(zfindex, maxByteSize, zfindexMax())
267
282 , ZFMP_IN(const ZFPathInfo &, srcPath)
283 , ZFMP_IN(const ZFPathInfo &, dstPath)
284 , ZFMP_IN_OPT(zfbool, isRecursive, zftrue)
285 , ZFMP_IN_OPT(zfbool, isForce, zftrue)
287
288// ============================================================
291public:
310
311public:
313 void _ZFP_init(
332 ) {
333 this->callbackIsExist = callbackIsExist;
334 this->callbackIsDir = callbackIsDir;
335 this->callbackToFileName = callbackToFileName;
336 this->callbackToChild = callbackToChild;
337 this->callbackToParent = callbackToParent;
338 this->callbackPathCreate = callbackPathCreate;
339 this->callbackRemove = callbackRemove;
340 this->callbackMove = callbackMove;
341 this->callbackFindFirst = callbackFindFirst;
342 this->callbackFindNext = callbackFindNext;
343 this->callbackFindClose = callbackFindClose;
344 this->callbackOpen = callbackOpen;
345 this->callbackClose = callbackClose;
346 this->callbackSize = callbackSize;
347 this->callbackTell = callbackTell;
348 this->callbackSeek = callbackSeek;
349 this->callbackRead = callbackRead;
350 this->callbackWrite = callbackWrite;
351 }
353
354public:
356 inline zfbool implIsExist(ZF_IN const zfchar *pathData) const {
357 return this->callbackIsExist(pathData);
358 }
359
360 inline zfbool implIsDir(ZF_IN const zfchar *pathData) const {
361 return this->callbackIsDir(pathData);
362 }
363
366 , ZF_IN const zfchar *pathData
367 ) const {
368 return this->callbackToFileName(ret, pathData);
369 }
370
373 , ZF_IN const zfchar *pathData
374 , ZF_IN const zfchar *childName
375 ) const {
376 return this->callbackToChild(ret, pathData, childName);
377 }
378
381 , ZF_IN const zfchar *pathData
382 ) const {
383 return this->callbackToParent(ret, pathData);
384 }
385
387 ZF_IN const zfchar *pathData
388 , ZF_IN_OPT zfbool autoMakeParent = zftrue
389 ) const {
390 return this->callbackPathCreate(pathData, autoMakeParent);
391 }
392
394 ZF_IN const zfchar *pathData
395 , ZF_IN_OPT zfbool isRecursive = zftrue
396 , ZF_IN_OPT zfbool isForce = zftrue
397 ) const {
398 return this->callbackRemove(pathData, isRecursive, isForce);
399 }
400
402 ZF_IN const zfchar *pathDataFrom
403 , ZF_IN const zfchar *pathDataTo
404 , ZF_IN_OPT zfbool isForce = zftrue
405 ) const {
406 return this->callbackMove(pathDataFrom, pathDataTo, isForce);
407 }
408
411 , ZF_IN const zfchar *pathData
412 ) const {
413 return this->callbackFindFirst(fd, pathData);
414 }
415
417 return this->callbackFindNext(fd);
418 }
419
420 inline void implFindClose(ZF_IN_OUT ZFFileFindData &fd) const {
421 return this->callbackFindClose(fd);
422 }
423
424 inline void *implOpen(
425 ZF_IN const zfchar *pathData
427 , ZF_IN_OPT zfbool autoCreateParent = zftrue
428 ) const {
429 return this->callbackOpen(pathData, flag, autoCreateParent);
430 }
431
432 inline zfbool implClose(ZF_IN void *token) const {
433 return this->callbackClose(token);
434 }
435
436 inline zfindex implSize(ZF_IN void *token) const {
437 return this->callbackSize(token);
438 }
439
440 inline zfindex implTell(ZF_IN void *token) const {
441 return this->callbackTell(token);
442 }
443
445 ZF_IN void *token
446 , ZF_IN zfindex byteSize
447 , ZF_IN_OPT ZFSeekPos position = ZFSeekPosBegin
448 ) const {
449 return this->callbackSeek(token, byteSize, position);
450 }
451
453 ZF_IN void *token
454 , ZF_IN void *buf
455 , ZF_IN zfindex maxByteSize
456 ) const {
457 return this->callbackRead(token, buf, maxByteSize);
458 }
459
461 ZF_IN void *token
462 , ZF_IN const void *src
463 , ZF_IN_OPT zfindex maxByteSize = zfindexMax()
464 ) const {
465 return this->callbackWrite(token, src, maxByteSize);
466 }
467};
470
471extern ZFLIB_ZFCore void _ZFP_ZFPathInfoRegister(
472 ZF_IN const zfstring &pathType
473 , ZF_IN const ZFPathInfoImpl &data
474 );
475extern ZFLIB_ZFCore void _ZFP_ZFPathInfoUnregister(ZF_IN const zfstring &pathType);
476
487#define ZFPATHTYPE_FILEIO_REGISTER(registerSig, pathType, ...) \
488 ZF_STATIC_REGISTER_INIT(ZFPathInfoReg_##registerSig) { \
489 ZFPathInfoImpl data; \
490 data._ZFP_init(__VA_ARGS__); \
491 _ZFP_ZFPathInfoRegister(pathType, data); \
492 } \
493 ZF_STATIC_REGISTER_DESTROY(ZFPathInfoReg_##registerSig) { \
494 _ZFP_ZFPathInfoUnregister(pathType); \
495 } \
496 ZF_STATIC_REGISTER_END(ZFPathInfoReg_##registerSig)
497
502 , ZFMP_IN(const zfstring &, pathType)
518
519// ============================================================
520// utils
529 , ZFMP_IN_OPT(const zfstring &, localPath, zfnull)
536 , ZFMP_OUT(ZFPathInfo &, ret)
537 , ZFMP_IN(const ZFPathInfo &, pathInfo)
538 , ZFMP_IN(const zfchar *, childPath)
545 , ZFMP_OUT(zfstring &, ret)
546 , ZFMP_IN(const ZFPathInfo &, pathInfo)
547 , ZFMP_IN(const zfchar *, childPath)
553 , ZFMP_IN(const ZFPathInfo &, pathInfo)
554 , ZFMP_IN(const zfchar *, childPath)
556
557// ============================================================
558// ZFInputForPathInfo
572#define ZFCallbackSerializeType_ZFInputForPathInfo "ZFInputForPathInfo"
573
586 , ZFMP_IN(const ZFPathInfo &, pathInfo)
597 , ZFMP_IN_OUT(ZFCallback &, ret)
598 , ZFMP_IN(const ZFPathInfo &, pathInfo)
601
604 , ZFMP_IN(void *, token)
605 , ZFMP_IN(const ZFPathInfo &, pathInfo)
607 , ZFMP_IN_OPT(zfbool, autoClose, zftrue)
611 , ZFMP_IN_OUT(ZFCallback &, ret)
612 , ZFMP_IN(void *, token)
613 , ZFMP_IN(const ZFPathInfo &, pathInfo)
615 , ZFMP_IN_OPT(zfbool, autoClose, zftrue)
617
618// ============================================================
619// ZFOutputForPathInfo
633#define ZFCallbackSerializeType_ZFOutputForPathInfo "ZFOutputForPathInfo"
634
647 , ZFMP_IN(const ZFPathInfo &, pathInfo)
658 , ZFMP_IN_OUT(ZFCallback &, ret)
659 , ZFMP_IN(const ZFPathInfo &, pathInfo)
662
665 , ZFMP_IN(void *, token)
666 , ZFMP_IN(const ZFPathInfo &, pathInfo)
668 , ZFMP_IN_OPT(zfbool, autoClose, zftrue)
672 , ZFMP_IN_OUT(ZFCallback &, ret)
673 , ZFMP_IN(void *, token)
674 , ZFMP_IN(const ZFPathInfo &, pathInfo)
676 , ZFMP_IN_OPT(zfbool, autoClose, zftrue)
678
679// ============================================================
680// ZFInputForLocal
694#define ZFCallbackSerializeType_ZFInputForLocal "ZFInputForLocal"
695
710 , ZFMP_IN(const zfchar *, localPath)
711 , ZFMP_IN(const ZFPathInfo &, pathInfo)
718 , ZFMP_OUT(ZFCallback &, ret)
719 , ZFMP_IN(const zfchar *, localPath)
720 , ZFMP_IN(const ZFPathInfo &, pathInfo)
723
724// ============================================================
725// ZFOutputForLocal
739#define ZFCallbackSerializeType_ZFOutputForLocal "ZFOutputForLocal"
740
756 , ZFMP_IN(const zfchar *, localPath)
757 , ZFMP_IN(const ZFPathInfo &, pathInfo)
764 , ZFMP_OUT(ZFCallback &, ret)
765 , ZFMP_IN(const zfchar *, localPath)
766 , ZFMP_IN(const ZFPathInfo &, pathInfo)
769
770// ============================================================
794 , ZFMP_OUT(ZFPathInfo &, chainPathInfo)
795 , ZFMP_IN_OUT(zfstring &, pathData)
796 , ZFMP_IN(const zfchar *, pathDataOrig)
800 , ZFMP_OUT(zfstring &, chainPathInfoString)
801 , ZFMP_IN_OUT(zfstring &, pathData)
802 , ZFMP_IN(const zfchar *, pathDataOrig)
806 , ZFMP_IN_OUT(zfstring &, ret)
807 , ZFMP_IN(const ZFPathInfo &, chainPathInfo)
808 , ZFMP_IN(const zfchar *, pathData)
812 , ZFMP_IN(const ZFPathInfo &, chainPathInfo)
813 , ZFMP_IN(const zfchar *, pathData)
815
816extern ZFLIB_ZFCore const zfchar _ZFP_ZFPathInfoChainCharMap[256];
824#define ZFPathInfoChainCharMap() _ZFP_ZFPathInfoChainCharMap
825
827#endif // #ifndef _ZFI_ZFFile_pathInfo_h_
828
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define zfclassLikePOD
shows the class is not a POD type, but you may use it like a POD except memset it to 0
Definition ZFCoreTypeDef_ClassType.h:41
#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 zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
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
file utility
zfbool ZFOutputForLocalT(ZFCallback &ret, const zfchar *localPath, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Create))
see ZFOutputForLocal
ZFOutput ZFOutputForPathInfoToken(void *token, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Create), zfbool autoClose=(_ZFT_t_zftrue))
see ZFOutputForPathInfo
void ZFPathInfoCallbackFindCloseDefault(ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackToFileName)(zfstring &ret, const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:18
zfbool(* ZFPathInfoCallbackIsExist)(const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:14
ZFOutput ZFOutputForPathInfo(const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Create))
util to create a file output callback
void ZFPathInfoImplGetAllT(ZFCoreArray< zfstring > &ret)
get all data registered by ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackToChild)(zfstring &ret, const zfchar *pathData, const zfchar *childName)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:23
zfbool(* ZFPathInfoCallbackToParent)(zfstring &ret, const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:29
zfindex ZFPathInfoCallbackSizeDefault(void *token)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackPathCreate)(const zfchar *pathData, zfbool autoMakeParent)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:34
zfbool ZFPathInfoCallbackRemoveDefault(const zfchar *pathData, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackFindFirstDefault(ZFFileFindData &fd, const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoRemove(const ZFPathInfo &pathInfo, zfbool isRecursive=(_ZFT_t_zftrue), zfbool isForce=(_ZFT_t_zftrue))
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackIsExistDefault(const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
zfindex ZFPathInfoRead(const ZFPathInfo &pathInfo, void *token, void *buf, zfindex maxByteSize)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackCloseDefault(void *token)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackPathCreateDefault(const zfchar *pathData, zfbool autoMakeParent=_ZFT_t_zftrue)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoChainDecode(ZFPathInfo &chainPathInfo, zfstring &pathData, const zfchar *pathDataOrig)
util for impl to parse chained path data
void *(* ZFPathInfoCallbackOpen)(const zfchar *pathData, ZFFileOpenOptionFlags flag, zfbool autoCreateParent)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:60
const ZFPathInfoImpl * ZFPathInfoImplForPathType(const zfstring &pathType)
get data registered by ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackToChildDefault(zfstring &ret, const zfchar *pathData, const zfchar *childName)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackRemove)(const zfchar *pathData, zfbool isRecursive, zfbool isForce)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:39
ZFPathInfo ZFLocalPathInfo(const zfstring &localPath=(zft_zfnull))
return local path info for current context
zfbool ZFOutputForPathInfoTokenT(ZFCallback &ret, void *token, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Create), zfbool autoClose=(_ZFT_t_zftrue))
see ZFOutputForPathInfo
zfindex ZFPathInfoCallbackWriteDefault(void *token, const void *src, zfindex maxByteSize=((zfindex) -1))
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCopy(const ZFPathInfo &srcPath, const ZFPathInfo &dstPath, zfbool isRecursive=(_ZFT_t_zftrue), zfbool isForce=(_ZFT_t_zftrue))
copy a file or directory from srcPath to dstPath
zfindex ZFPathInfoWrite(const ZFPathInfo &pathInfo, void *token, const void *src, zfindex maxByteSize=(((zfindex) -1)))
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackToParentDefault(zfstring &ret, const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoPathCreate(const ZFPathInfo &pathInfo, zfbool autoMakeParent=(_ZFT_t_zftrue))
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoClose(const ZFPathInfo &pathInfo, void *token)
see ZFPATHTYPE_FILEIO_REGISTER
ZFCoreArray< zfstring > ZFPathInfoImplGetAll()
get all data registered by ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:513
zfindex(* ZFPathInfoCallbackWrite)(void *token, const void *src, zfindex maxByteSize)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:84
zfbool(* ZFPathInfoCallbackMove)(const zfchar *pathDataFrom, const zfchar *pathDataTo, zfbool isForce)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:45
ZFInput ZFInputForPathInfo(const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Read))
util to create a file input callback
zfbool ZFPathInfoMove(const ZFPathInfo &pathInfoFrom, const zfchar *pathDataTo, zfbool isForce=(_ZFT_t_zftrue))
see ZFPATHTYPE_FILEIO_REGISTER
ZFOutput ZFOutputForLocal(const zfchar *localPath, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Create))
util to create a file output callback
void ZFPathInfoChainEncodeT(zfstring &ret, const ZFPathInfo &chainPathInfo, const zfchar *pathData)
see ZFPathInfoChainDecode
zfbool ZFPathInfoToFileName(zfstring &ret, const ZFPathInfo &pathInfo)
see ZFPATHTYPE_FILEIO_REGISTER
ZFPathInfo ZFPathInfoForLocal(const ZFPathInfo &pathInfo, const zfchar *childPath)
see ZFPathInfoForLocalT
zfbool ZFPathInfoChainDecodeString(zfstring &chainPathInfoString, zfstring &pathData, const zfchar *pathDataOrig)
see ZFPathInfoChainDecode
zfbool ZFInputForPathInfoT(ZFCallback &ret, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Read))
see ZFInputForPathInfo
zfbool ZFPathInfoForLocalT(ZFPathInfo &ret, const ZFPathInfo &pathInfo, const zfchar *childPath)
util to make a child path info relative to existing one, see also ZFPathInfoCallbackToChild
zfbool ZFPathInfoFindFirst(const ZFPathInfo &pathInfo, ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoIsDir(const ZFPathInfo &pathInfo)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackFindNext)(ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:56
zfbool ZFPathInfoFindNext(const ZFPathInfo &pathInfo, ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
zfstring ZFPathInfoChainEncode(const ZFPathInfo &chainPathInfo, const zfchar *pathData)
see ZFPathInfoChainDecode
ZFInput ZFInputForLocal(const zfchar *localPath, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Read))
util to create a file input callback
zfindex(* ZFPathInfoCallbackRead)(void *token, void *buf, zfindex maxByteSize)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:78
zfbool(* ZFPathInfoCallbackSeek)(void *token, zfindex byteSize, ZFSeekPos position)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:72
zfindex(* ZFPathInfoCallbackTell)(void *token)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:70
zfindex(* ZFPathInfoCallbackSize)(void *token)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:68
void * ZFPathInfoCallbackOpenDefault(const zfchar *pathData, ZFFileOpenOptionFlags flag=v_ZFFileOpenOption::e_Read, zfbool autoCreateParent=_ZFT_t_zftrue)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackIsDirDefault(const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
zfindex ZFPathInfoTell(const ZFPathInfo &pathInfo, void *token)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackFindNextDefault(ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackIsDir)(const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:16
zfbool ZFOutputForPathInfoT(ZFCallback &ret, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Create))
see ZFOutputForPathInfo
zfbool ZFPathInfoSeek(const ZFPathInfo &pathInfo, void *token, zfindex byteSize, ZFSeekPos position=(ZFSeekPosBegin))
see ZFPATHTYPE_FILEIO_REGISTER
void ZFPathInfoFindClose(const ZFPathInfo &pathInfo, ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoIsExist(const ZFPathInfo &pathInfo)
see ZFPATHTYPE_FILEIO_REGISTER
void * ZFPathInfoOpen(const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flag=(v_ZFFileOpenOption::e_Read), zfbool autoCreateParent=(_ZFT_t_zftrue))
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoToParent(zfstring &ret, const ZFPathInfo &pathInfo)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackMoveDefault(const zfchar *pathDataFrom, const zfchar *pathDataTo, zfbool isForce=_ZFT_t_zftrue)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool(* ZFPathInfoCallbackClose)(void *token)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:66
zfbool(* ZFPathInfoCallbackFindFirst)(ZFFileFindData &fd, const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:51
ZFInput ZFInputForPathInfoToken(void *token, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Read), zfbool autoClose=(_ZFT_t_zftrue))
see ZFInputForPathInfo
zfbool ZFPathInfoCallbackToFileNameDefault(zfstring &ret, const zfchar *pathData)
see ZFPATHTYPE_FILEIO_REGISTER
zfindex ZFPathInfoSize(const ZFPathInfo &pathInfo, void *token)
see ZFPATHTYPE_FILEIO_REGISTER
zfindex ZFPathInfoCallbackReadDefault(void *token, void *buf, zfindex maxByteSize)
see ZFPATHTYPE_FILEIO_REGISTER
void(* ZFPathInfoCallbackFindClose)(ZFFileFindData &fd)
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:58
zfindex ZFPathInfoCallbackTellDefault(void *token)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFPathInfoCallbackSeekDefault(void *token, zfindex byteSize, ZFSeekPos position=ZFSeekPosBegin)
see ZFPATHTYPE_FILEIO_REGISTER
zfbool ZFInputForLocalT(ZFCallback &ret, const zfchar *localPath, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Read))
see ZFInputForLocal
zfbool ZFInputForPathInfoTokenT(ZFCallback &ret, void *token, const ZFPathInfo &pathInfo, ZFFileOpenOptionFlags flags=(v_ZFFileOpenOption::e_Read), zfbool autoClose=(_ZFT_t_zftrue))
see ZFInputForPathInfo
zfbool ZFPathInfoToChild(zfstring &ret, const ZFPathInfo &pathInfo, const zfchar *childName)
see ZFPATHTYPE_FILEIO_REGISTER
#define ZFMP_IN_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:117
#define ZFMP_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:111
#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_5(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2, ZFMP_3, ZFMP_4)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:1228
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_INLINE_DECLARE_0(ZFLIB_, ReturnType, MethodName)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:557
#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
#define ZFTYPEID_ACCESS_ONLY_REG(ZFLIB_, TypeName, Type,...)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:205
#define ZFTYPEID_ACCESS_ONLY_DECLARE(ZFLIB_, TypeName, Type)
see ZFTYPEID_DECLARE
Definition ZFTypeIdDeclare.h:195
callback used by ZFFramework
Definition ZFCallback.h:96
light weight array
Definition ZFCoreArray.h:331
data used by ZFFile when finding files
Definition ZFFile_fwd.h:53
see v_ZFFileOpenOption, ZFFileOpenOptionFlagsToString, ZFFileOpenOptionFlagsFromString
Definition ZFFile_fwd.h:44
general input callback
Definition ZFIOCallback_input.h:37
general output callback
Definition ZFIOCallback_output.h:37
path related info storage for impl, actual meaning of the info depends on impl
Definition ZFPathInfo.h:35
callback data for ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:290
ZFPathInfoCallbackMove callbackMove
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:299
ZFPathInfoCallbackToFileName callbackToFileName
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:294
ZFPathInfoCallbackPathCreate callbackPathCreate
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:297
ZFPathInfoCallbackIsDir callbackIsDir
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:293
zfbool implMove(const zfchar *pathDataFrom, const zfchar *pathDataTo, zfbool isForce=_ZFT_t_zftrue) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:401
zfindex implRead(void *token, void *buf, zfindex maxByteSize) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:452
zfindex implTell(void *token) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:440
ZFPathInfoCallbackRead callbackRead
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:308
zfbool implFindNext(ZFFileFindData &fd) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:416
zfbool implToChild(zfstring &ret, const zfchar *pathData, const zfchar *childName) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:371
zfbool implRemove(const zfchar *pathData, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:393
ZFPathInfoCallbackToParent callbackToParent
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:296
void implFindClose(ZFFileFindData &fd) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:420
zfbool implToParent(zfstring &ret, const zfchar *pathData) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:379
ZFPathInfoCallbackOpen callbackOpen
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:303
zfbool implSeek(void *token, zfindex byteSize, ZFSeekPos position=ZFSeekPosBegin) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:444
ZFPathInfoCallbackSeek callbackSeek
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:307
ZFPathInfoCallbackWrite callbackWrite
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:309
zfbool implPathCreate(const zfchar *pathData, zfbool autoMakeParent=_ZFT_t_zftrue) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:386
zfbool implClose(void *token) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:432
ZFPathInfoCallbackClose callbackClose
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:304
ZFPathInfoCallbackIsExist callbackIsExist
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:292
zfindex implSize(void *token) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:436
ZFPathInfoCallbackFindClose callbackFindClose
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:302
zfindex implWrite(void *token, const void *src, zfindex maxByteSize=((zfindex) -1)) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:460
ZFPathInfoCallbackToChild callbackToChild
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:295
void * implOpen(const zfchar *pathData, ZFFileOpenOptionFlags flag=v_ZFFileOpenOption::e_Read, zfbool autoCreateParent=_ZFT_t_zftrue) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:424
ZFPathInfoCallbackSize callbackSize
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:305
ZFPathInfoCallbackTell callbackTell
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:306
ZFPathInfoCallbackRemove callbackRemove
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:298
zfbool implIsExist(const zfchar *pathData) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:356
ZFPathInfoCallbackFindFirst callbackFindFirst
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:300
zfbool implFindFirst(ZFFileFindData &fd, const zfchar *pathData) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:409
zfbool implIsDir(const zfchar *pathData) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:360
ZFPathInfoCallbackFindNext callbackFindNext
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:301
zfbool implToFileName(zfstring &ret, const zfchar *pathData) const
see ZFPATHTYPE_FILEIO_REGISTER
Definition ZFFile_pathInfo.h:364
open falgs, similar to fopen's flags, while we have binary mode only
Definition ZFFile_fwd.h:34
@ e_Read
Read(1 << 1)
Definition ZFFile_fwd.h:36
@ e_Create
Create(1 << 0)
Definition ZFFile_fwd.h:35