ZFFramework
Loading...
Searching...
No Matches
ZFPInterface_ZFFile Class Referenceabstract

protocol for ZFFile More...

#include <ZFProtocolZFFile.h>

Inheritance diagram for ZFPInterface_ZFFile:
ZFProtocol

Public Member Functions

virtual const zfcharprotocolName (void) const
 get the name of the protocol module, e.g. "ZFObject"
virtual zfbool fileIsExist (const zfstring &path)=0
 see ZFFileIsExist
virtual zfbool isDir (const zfstring &path)=0
 see ZFFileIsDir
virtual zfbool filePathCreate (const zfstring &path, zfbool autoCreateParent=_ZFT_t_zffalse)=0
 see ZFFilePathCreate
virtual zfbool fileRemove (const zfstring &path, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)=0
 see ZFFileRemove
virtual zfbool fileMove (const zfstring &dstPath, const zfstring &srcPath, zfbool isForce=_ZFT_t_zftrue)=0
 see ZFFileMove
virtual zftimet fileModTime (const zfstring &path)=0
 see ZFFileModTime
virtual zfbool fileModTime (const zfstring &path, zftimet time)=0
 see ZFFileModTime
virtual zfbool fileFindFirst (ZFIOFindData::Impl &fd, const zfstring &path)=0
 see ZFFileFindFirst
virtual zfbool fileFindNext (ZFIOFindData::Impl &fd)=0
 see ZFFileFindNext, fileFindFirst
virtual void fileFindClose (ZFIOFindData::Impl &fd)=0
 see ZFFileFindClose, fileFindFirst
virtual void * fileOpen (const zfstring &filePath, ZFIOOpenOptionFlags flags)=0
 see ZFFileOpen
virtual zfbool fileClose (void *token)=0
 see ZFFileClose
virtual zfindex fileTell (void *token)=0
 see ZFFileTell
virtual zfbool fileSeek (void *token, zfindex byteSize, ZFSeekPos seekPos=ZFSeekPosBegin)=0
 see ZFFileSeek
virtual zfindex fileRead (void *token, void *buf, zfindex maxByteSize)=0
 see ZFFileRead
virtual zfindex fileWrite (void *token, const void *src, zfindex maxByteSize)=0
 see ZFFileWrite
virtual void fileFlush (void *token)=0
 see ZFFileFlush
Public Member Functions inherited from ZFProtocol
virtual void protocolOnInit (void)
 called to init the protocol
virtual void protocolOnInitFinish (void)
 see protocolOnInit
virtual void protocolOnDeallocPrepare (void)
 see protocolOnInit
virtual void protocolOnDealloc (void)
 see protocolOnInit
virtual ZFProtocolInstanceState protocolInstanceState (void)
 protocol instance's state
virtual const zfcharprotocolImplName (void) const
 get the name of the protocol implementation, e.g. "ZFObject_default"
virtual ZFProtocolLevel protocolImplLevel (void) const
 get the level of the protocol implementation
virtual const zfcharprotocolImplPlatformHint (void) const
 get type hint of the implementation or empty string if not defined, e.g. "iOS:NSString" for iOS's string impl, use ZFPROTOCOL_IMPLEMENTATION_PLATFORM_HINT to register
virtual void objectInfoT (zfstring &ret) const
 see objectInfo
virtual zfstring objectInfo (void) const
 get a short info about this object

Protected Types

typedef ZFProtocol zfsuper
 class ref to super
typedef ZFPInterface_ZFFile zfself
 class ref to self

Detailed Description

protocol for ZFFile

Member Function Documentation

◆ protocolName()

virtual const zfchar * ZFPInterface_ZFFile::protocolName ( void ) const
inlinevirtual

get the name of the protocol module, e.g. "ZFObject"

Reimplemented from ZFProtocol.

◆ fileFindFirst()

virtual zfbool ZFPInterface_ZFFile::fileFindFirst ( ZFIOFindData::Impl & fd,
const zfstring & path )
pure virtual

see ZFFileFindFirst

use ZFIOFindData::Impl to store find result
remember that you must remove the dir "." and "..", and if there is only two dir named "." and "..", you should return false for fileFindFirst
if returned zffalse, no fileFindClose would be called anymore

Warning
it's the implementation's responsibility to allocate and deallocate the nativeFd, and, if fileFindFirst would return zffalse, you must deallocate the nativeFd (if allocated) before return

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