6#ifndef _ZFI_ZFIODef_util_h_
7#define _ZFI_ZFIODef_util_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
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
zfstring ZFFileNameOf(const zfchar *src)
see ZFFileNameOfT
zfbool ZFPathOfWithoutAllExtT(zfstring &ret, const zfchar *src)
get file path without all ext, e.g. "/path/file" from "/path/file.ext0.ext1", or original string if n...
zfbool ZFPathComponentsOfT(ZFCoreArray< zfstring > &ret, const zfchar *src)
get each file components from path or empty if error, e.g. {"path", "file.ext"}(as array) from "/path...
zfbool ZFPathOfWithoutExtT(zfstring &ret, const zfchar *src)
get file path without ext, e.g. "/path/file.ext0" from "/path/file.ext0.ext1", or original string if ...
zfbool ZFPathParentOfT(zfstring &ret, const zfchar *src)
get parent path
ZFCoreArray< zfstring > ZFPathComponentsOf(const zfchar *src)
see ZFPathComponentsOfT
zfstring ZFPathOfWithoutExt(const zfchar *src)
see ZFPathOfWithoutExtT
zfstring ZFFileExtOf(const zfchar *src)
see ZFFileExtOfT
zfstring ZFPathOfWithoutAllExt(const zfchar *src)
see ZFPathOfWithoutAllExtT
zfstring ZFPathParentOf(const zfchar *src)
see ZFPathParentOfT
zfbool ZFPathFormatRelativeT(zfstring &ret, const zfchar *src, zfindex srcLen=(((zfindex) -1)))
util method to resolve ".." in path
zfstring ZFPathFormatRelative(const zfchar *src, zfindex srcLen=(((zfindex) -1)))
see ZFPathFormatRelativeT
Definition ZFIODef_util.h:57
zfstring ZFPathFormat(const zfchar *src, zfindex srcLen=(((zfindex) -1)))
see ZFPathFormatT
Definition ZFIODef_util.h:39
zfbool ZFIOCopy(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
zfbool ZFFileNameOfT(zfstring &ret, const zfchar *src)
get file name from path or src if error, e.g. "file.ext" from "/path/file.ext"
zfbool ZFFileExtOfT(zfstring &ret, const zfchar *src)
get file extension from path or empty if error, e.g. "ext1" from "/path/file.ext0....
zfbool ZFFileNameOfWithoutExtT(zfstring &ret, const zfchar *src)
get file name without extension from path or src if error, e.g. "file.ext0" from "/path/file....
zfbool ZFIOForEachDir(const ZFPathInfo &pathInfo, const ZFListener &fileCallback, zfbool isRecursive=(_ZFT_t_zftrue))
util method to loop each dir, see ZFIOForEach
zfbool ZFIOForEach(const ZFPathInfo &pathInfo, const ZFListener &fileCallback, zfbool isRecursive=(_ZFT_t_zftrue))
util method to loop each child file or dir in specified pathInfo
void ZFIOTreePrint(const ZFPathInfo &pathInfo, const ZFOutput &outputCallback=(ZFOutputDefault()), const zfchar *headToken=(zft_zfnull), const zfchar *indentToken=(" "))
list all files, usually for debug use
zfbool ZFIOForEachFile(const ZFPathInfo &pathInfo, const ZFListener &fileCallback, zfbool isRecursive=(_ZFT_t_zftrue))
util method to loop each file, see ZFIOForEach
zfbool ZFPathFormatT(zfstring &ret, const zfchar *src, zfindex srcLen=(((zfindex) -1)))
format path
zfstring ZFFileNameOfWithoutExt(const zfchar *src)
see ZFFileNameOfWithoutExtT
#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_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_INLINE_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:835
#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
const ZFOutput & ZFOutputDefault(void)
default output callback, output source must be zfchar *string
light weight array
Definition ZFCoreArray.h:331
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
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:34