ZFFramework
Loading...
Searching...
No Matches
ZFIOFindData Class Reference

data used by ZFIO when finding files More...

#include <ZFIODef_fwd.h>

Classes

class  Impl
 for impl to achieve custom find logic More...

Public Member Functions

const zfstring & name (void) const
 return file name of file
zfbool isDir (void) const
 return true if is a directory
void objectInfoT (zfstring &ret) const
 see objectInfo
zfstring objectInfo (void) const
 return object info
Impl & impl (void) const
 the impl
void implCopy (const ZFIOFindData &ref) const
 copy the impl data
const zfstring & implName (void) const
 name for the impl
void * implUserData (void) const
 user data passed from implAttach
void implAttach (const zfstring &implName, void *implUserData=zft_zfnull)
 begin first find
void implDetach (void)
 close find
void * implCheck (const zfstring &implName) const
 check whether impl matches, assert fail if not match, return the implUserData
void implTag (const zfstring &key, ZFObject *value) const
 util for impl to store extra data
zfany implTag (const zfstring &key) const
 util for impl to store extra data

Detailed Description

data used by ZFIO when finding files

typical usage:

ZFIOImpl *io = ZFIOImplForPathType(pathType);
if(io->ioFindFirst(fd, path)) {
do {
// do something
} while(io->ioFindNext(fd));
io->ioFindClose(fd);
}
zfautoT< ZFIOImpl > ZFIOImplForPathType(const zfstring &pathType)
main entry for abstract IO for ZFFramework
data used by ZFIO when finding files
Definition ZFIODef_fwd.h:71
see ZFIOImplForPathType
Definition ZFIODef_fwd.h:298
virtual zfbool ioFindNext(ZFIOFindData &fd)=0
see ZFIOImplForPathType
virtual zfbool ioFindFirst(ZFIOFindData &fd, const zfstring &pathData)=0
see ZFIOImplForPathType
virtual void ioFindClose(ZFIOFindData &fd)=0
see ZFIOImplForPathType
Returns
false if error or nothing found
Note
path must be well formed, use ZFPathFormat if necessary

The documentation for this class was generated from the following file: