6#include <cx/fs/vfsprovider.h>
8typedef struct VFSFS VFSFS;
9typedef struct VFSFS_WeakRef VFSFS_WeakRef;
13typedef struct VFSFS_ClassIf {
19 flags_t (*flags)(_In_
void* self);
21 _Ret_opt_valid_
ObjInst* (*open)(_In_
void* self, _In_opt_ strref path, flags_t flags);
23 bool (*setTimes)(_In_
void* self, _In_opt_ strref path, int64 modified, int64 accessed);
24 bool (*createDir)(_In_
void* self, _In_opt_ strref path);
25 bool (*removeDir)(_In_
void* self, _In_opt_ strref path);
26 bool (*deleteFile)(_In_
void* self, _In_opt_ strref path);
27 bool (*rename)(_In_
void* self, _In_opt_ strref oldpath, _In_opt_ strref newpath);
28 bool (*getFSPath)(_In_
void* self, _Inout_
string* out, _In_opt_ strref path);
29 bool (*searchInit)(_In_
void* self, _Out_
FSSearchIter* iter, _In_opt_ strref path, _In_opt_ strref pattern,
bool stat);
30 bool (*searchValid)(_In_
void* self, _In_
FSSearchIter* iter);
31 bool (*searchNext)(_In_
void* self, _Inout_
FSSearchIter* iter);
32 void (*searchFinish)(_In_
void* self, _Inout_
FSSearchIter* iter);
34extern VFSFS_ClassIf VFSFS_ClassIf_tmpl;
49#define VFSFS(inst) ((VFSFS*)(unused_noeval((inst) && &((inst)->_is_VFSFS)), (inst)))
50#define VFSFSNone ((VFSFS*)NULL)
52typedef struct VFSFS_WeakRef {
55 void* _is_VFSFS_WeakRef;
56 void* _is_ObjInst_WeakRef;
61#define VFSFS_WeakRef(inst) ((VFSFS_WeakRef*)(unused_noeval((inst) && &((inst)->_is_VFSFS_WeakRef)), (inst)))
65#define vfsfsCreate(rootpath) VFSFS_create(rootpath)
70#define vfsfsFlags(self) (self)->_->flags(VFSFS(self))
74#define vfsfsOpen(self, path, flags) (self)->_->open(VFSFS(self), path, flags)
76#define vfsfsStat(self, path, stat) (self)->_->stat(VFSFS(self), path, stat)
78#define vfsfsSetTimes(self, path, modified, accessed) (self)->_->setTimes(VFSFS(self), path, modified, accessed)
80#define vfsfsCreateDir(self, path) (self)->_->createDir(VFSFS(self), path)
82#define vfsfsRemoveDir(self, path) (self)->_->removeDir(VFSFS(self), path)
84#define vfsfsDeleteFile(self, path) (self)->_->deleteFile(VFSFS(self), path)
86#define vfsfsRename(self, oldpath, newpath) (self)->_->rename(VFSFS(self), oldpath, newpath)
88#define vfsfsGetFSPath(self, out, path) (self)->_->getFSPath(VFSFS(self), out, path)
90#define vfsfsSearchInit(self, iter, path, pattern, stat) (self)->_->searchInit(VFSFS(self), iter, path, pattern, stat)
92#define vfsfsSearchValid(self, iter) (self)->_->searchValid(VFSFS(self), iter)
94#define vfsfsSearchNext(self, iter) (self)->_->searchNext(VFSFS(self), iter)
96#define vfsfsSearchFinish(self, iter) (self)->_->searchFinish(VFSFS(self), iter)
#define saDeclarePtr(name)
enum FSPathStatEnum FSPathStat
@ FS_Nonexistent
Path does not exist.
#define _objfactory_check
CX Object System - Object-oriented programming in C.