abstract IO More...
#include "ZFIODef_fwd.h"
Go to the source code of this file.
Functions | |
zfbool | ZFPathFormatT (zfstring &ret, const zfchar *src, zfindex srcLen=(((zfindex) -1))) |
format path | |
zfstring | ZFPathFormat (const zfchar *src, zfindex srcLen=(((zfindex) -1))) |
see ZFPathFormatT | |
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 | |
zfbool | ZFFileNameOfT (zfstring &ret, const zfchar *src) |
get file name from path or src if error, e.g. "file.ext" from "/path/file.ext" | |
zfstring | ZFFileNameOf (const zfchar *src) |
see ZFFileNameOfT | |
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.ext0.ext1" | |
zfstring | ZFFileNameOfWithoutExt (const zfchar *src) |
see ZFFileNameOfWithoutExtT | |
zfbool | ZFFileExtOfT (zfstring &ret, const zfchar *src) |
get file extension from path or empty if error, e.g. "ext1" from "/path/file.ext0.ext1", or empty if no extension | |
zfstring | ZFFileExtOf (const zfchar *src) |
see ZFFileExtOfT | |
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 no extension | |
zfstring | ZFPathOfWithoutExt (const zfchar *src) |
see ZFPathOfWithoutExtT | |
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 no extension | |
zfstring | ZFPathOfWithoutAllExt (const zfchar *src) |
see ZFPathOfWithoutAllExtT | |
zfbool | ZFPathParentOfT (zfstring &ret, const zfchar *src) |
get parent path | |
zfstring | ZFPathParentOf (const zfchar *src) |
see ZFPathParentOfT | |
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/file.ext" | |
ZFCoreArray< zfstring > | ZFPathComponentsOf (const zfchar *src) |
see ZFPathComponentsOfT | |
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 | ZFIOForEach (const ZFPathInfo &pathInfo, const ZFListener &fileCallback, zfbool isRecursive=(_ZFT_t_zftrue)) |
util method to loop each child file or dir in specified pathInfo | |
zfbool | ZFIOForEachFile (const ZFPathInfo &pathInfo, const ZFListener &fileCallback, zfbool isRecursive=(_ZFT_t_zftrue)) |
util method to loop each file, see ZFIOForEach | |
zfbool | ZFIOForEachDir (const ZFPathInfo &pathInfo, const ZFListener &fileCallback, zfbool isRecursive=(_ZFT_t_zftrue)) |
util method to loop each dir, see ZFIOForEach | |
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 | |
abstract IO
|
extern |
format path
format rules:
xxx://
)xxx://
)get file name from path or src if error, e.g. "file.ext" from "/path/file.ext"
get file name without extension from path or src if error, e.g. "file.ext0" from "/path/file.ext0.ext1"
get file extension from path or empty if error, e.g. "ext1" from "/path/file.ext0.ext1", or empty if no extension
get file path without ext, e.g. "/path/file.ext0" from "/path/file.ext0.ext1", or original string if no extension
get file path without all ext, e.g. "/path/file" from "/path/file.ext0.ext1", or original string if no extension
get parent path
return empty string if no parent found
|
extern |
get each file components from path or empty if error, e.g. {"path", "file.ext"}(as array) from "/path/file.ext"
|
extern |
util method to loop each child file or dir in specified pathInfo
usage:
fileCallback's sender would be the v_ZFIOFindData, param0 is v_ZFPathInfo that describe the child file or dir, and param1 is a v_zfstring stores the relative path to source pathInfo, set ZFArgs::eventFiltered to indicates process done
|
extern |
copy a file or directory from srcPath to dstPath
if both src and dst exist, but one is file and another is dir, return zffalse
merge directory if dst is an existing dir (if isForce not set, would return false if dst has a child file with the same path in src)
override file if dst is an existing file and isForce is zftrue