ZFFramework
 
Loading...
Searching...
No Matches
ZFIO_common.h File Reference

abstract IO More...

#include "ZFIODef.h"

Go to the source code of this file.

Functions

const zfstringZFPathType_modulePath ()
 see ZFPathInfo
 
const zfstringZFPathType_settingPath ()
 see ZFPathInfo
 
const zfstringZFPathType_storagePath ()
 see ZFPathInfo
 
const zfstringZFPathType_storageSharedPath ()
 see ZFPathInfo
 
const zfstringZFPathType_cachePath ()
 see ZFPathInfo
 
const zfstringZFPathType_text ()
 see ZFPathInfo
 
const zfstringZFPathType_bin ()
 see ZFPathInfo
 
zfautoT< ZFIOTokenZFIOOpenCache (const ZFPathInfo &pathInfo=(zft_zfnull), ZFIOOpenOptionFlags flags=(v_ZFIOOpenOption::e_Read|v_ZFIOOpenOption::e_Write), zfbool autoRemove=(_ZFT_t_zftrue))
 util to open cache file under ZFPathType_cachePath
 
ZFPathInfo ZFIO_cachePathGen ()
 generate a cache pathInfo, which ensured not same for each call
 

Detailed Description

abstract IO

Function Documentation

◆ ZFPathType_modulePath()

const zfstring & ZFPathType_modulePath ( )
extern

see ZFPathInfo

pathData is file's relative path within ZFPathForModule

Note
path must be well formed, use ZFPathFormat if necessary

◆ ZFPathType_settingPath()

const zfstring & ZFPathType_settingPath ( )
extern

see ZFPathInfo

pathData is file's relative path within ZFPathForSetting

Note
path must be well formed, use ZFPathFormat if necessary

◆ ZFPathType_storagePath()

const zfstring & ZFPathType_storagePath ( )
extern

see ZFPathInfo

pathData is file's relative path within ZFPathForStorage

Note
path must be well formed, use ZFPathFormat if necessary

◆ ZFPathType_storageSharedPath()

const zfstring & ZFPathType_storageSharedPath ( )
extern

see ZFPathInfo

pathData is file's relative path within ZFPathForStorageShared

Note
path must be well formed, use ZFPathFormat if necessary

◆ ZFPathType_cachePath()

const zfstring & ZFPathType_cachePath ( )
extern

see ZFPathInfo

pathData is file's relative path within ZFPathForCache

note, the cache path's content would be removed according to ZFPathForCacheClear

Note
path must be well formed, use ZFPathFormat if necessary

◆ ZFPathType_text()

const zfstring & ZFPathType_text ( )
extern

see ZFPathInfo

pathData is unmodified plain text (or buffer), may contain non printable chars, use ZFPathType_bin type if necessary

◆ ZFPathType_bin()

const zfstring & ZFPathType_bin ( )
extern

see ZFPathInfo

pathData is binary data encoded with ZFCoreDataEncode with default char map
use ZFPathType_text for plain text

◆ ZFIOOpenCache()

zfautoT< ZFIOToken > ZFIOOpenCache ( const ZFPathInfo & pathInfo = (zft_zfnull),
ZFIOOpenOptionFlags flags = (v_ZFIOOpenOption::e_Read|v_ZFIOOpenOption::e_Write),
zfbool autoRemove = (_ZFT_t_zftrue) )
extern

util to open cache file under ZFPathType_cachePath

if autoRemove is true (by default), the cache file would be removed when closed