6#include <cx/fs/vfsprovider.h>
9typedef struct VFSDir VFSDir;
10typedef struct VFSVFS VFSVFS;
11typedef struct VFSVFS_WeakRef VFSVFS_WeakRef;
15typedef struct VFSVFS_ClassIf {
21 flags_t (*flags)(_In_
void* self);
23 _Ret_opt_valid_
ObjInst* (*open)(_In_
void* self, _In_opt_ strref path, flags_t flags);
25 bool (*setTimes)(_In_
void* self, _In_opt_ strref path, int64 modified, int64 accessed);
26 bool (*createDir)(_In_
void* self, _In_opt_ strref path);
27 bool (*removeDir)(_In_
void* self, _In_opt_ strref path);
28 bool (*deleteFile)(_In_
void* self, _In_opt_ strref path);
29 bool (*rename)(_In_
void* self, _In_opt_ strref oldpath, _In_opt_ strref newpath);
30 bool (*getFSPath)(_In_
void* self, _Inout_
string* out, _In_opt_ strref path);
31 bool (*searchInit)(_In_
void* self, _Out_
FSSearchIter* iter, _In_opt_ strref path, _In_opt_ strref pattern,
bool stat);
32 bool (*searchValid)(_In_
void* self, _In_
FSSearchIter* iter);
33 bool (*searchNext)(_In_
void* self, _Inout_
FSSearchIter* iter);
34 void (*searchFinish)(_In_
void* self, _Inout_
FSSearchIter* iter);
36extern VFSVFS_ClassIf VFSVFS_ClassIf_tmpl;
38typedef struct VFSVFS {
52#define VFSVFS(inst) ((VFSVFS*)(unused_noeval((inst) && &((inst)->_is_VFSVFS)), (inst)))
53#define VFSVFSNone ((VFSVFS*)NULL)
55typedef struct VFSVFS_WeakRef {
58 void* _is_VFSVFS_WeakRef;
59 void* _is_ObjInst_WeakRef;
64#define VFSVFS_WeakRef(inst) ((VFSVFS_WeakRef*)(unused_noeval((inst) && &((inst)->_is_VFSVFS_WeakRef)), (inst)))
68#define vfsvfsCreate(vfs, rootpath) VFSVFS_create(VFS(vfs), rootpath)
73#define vfsvfsFlags(self) (self)->_->flags(VFSVFS(self))
77#define vfsvfsOpen(self, path, flags) (self)->_->open(VFSVFS(self), path, flags)
79#define vfsvfsStat(self, path, stat) (self)->_->stat(VFSVFS(self), path, stat)
81#define vfsvfsSetTimes(self, path, modified, accessed) (self)->_->setTimes(VFSVFS(self), path, modified, accessed)
83#define vfsvfsCreateDir(self, path) (self)->_->createDir(VFSVFS(self), path)
85#define vfsvfsRemoveDir(self, path) (self)->_->removeDir(VFSVFS(self), path)
87#define vfsvfsDeleteFile(self, path) (self)->_->deleteFile(VFSVFS(self), path)
89#define vfsvfsRename(self, oldpath, newpath) (self)->_->rename(VFSVFS(self), oldpath, newpath)
91#define vfsvfsGetFSPath(self, out, path) (self)->_->getFSPath(VFSVFS(self), out, path)
93#define vfsvfsSearchInit(self, iter, path, pattern, stat) (self)->_->searchInit(VFSVFS(self), iter, path, pattern, stat)
95#define vfsvfsSearchValid(self, iter) (self)->_->searchValid(VFSVFS(self), iter)
97#define vfsvfsSearchNext(self, iter) (self)->_->searchNext(VFSVFS(self), iter)
99#define vfsvfsSearchFinish(self, iter) (self)->_->searchFinish(VFSVFS(self), iter)
#define saDeclarePtr(name)
enum FSPathStatEnum FSPathStat
@ FS_Nonexistent
Path does not exist.
#define _objfactory_guaranteed
CX Object System - Object-oriented programming in C.