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 zfchar *path)=0
 see ZFFileIsExist
 
virtual zfbool isDir (const zfchar *path)=0
 see ZFFileIsDir
 
virtual zfbool filePathCreate (const zfchar *path, zfbool autoMakeParent=_ZFT_t_zffalse)=0
 see ZFPathCreate
 
virtual zfbool fileCopy (const zfchar *srcPath, const zfchar *dstPath, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)=0
 see ZFFileCopy
 
virtual zfbool fileMove (const zfchar *srcPath, const zfchar *dstPath, zfbool isForce=_ZFT_t_zftrue)=0
 see ZFFileMove
 
virtual zfbool fileRemove (const zfchar *path, zfbool isRecursive=_ZFT_t_zftrue, zfbool isForce=_ZFT_t_zftrue)=0
 see ZFFileRemove
 
virtual zfbool fileFindFirst (ZFFileFindData::Impl &fd, const zfchar *path)=0
 see ZFFileFindFirst
 
virtual zfbool fileFindNext (ZFFileFindData::Impl &fd)=0
 see ZFFileFindNext, fileFindFirst
 
virtual void fileFindClose (ZFFileFindData::Impl &fd)=0
 see ZFFileFindClose, fileFindFirst
 
virtual void * fileOpen (const zfchar *filePath, ZFFileOpenOptionFlags flag=v_ZFFileOpenOption::e_Read)=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 position=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
 
virtual zfbool fileIsEof (void *token)=0
 see ZFFileIsEof
 
virtual zfbool fileIsError (void *token)=0
 see ZFFileIsError
 
- 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 ( ZFFileFindData::Impl & fd,
const zfchar * path )
pure virtual

see ZFFileFindFirst

use ZFFileFindData::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: