10typedef struct VFSFileProvider {
15 bool (*close)(_In_
void* self);
16 bool (*read)(_In_
void* self, _Out_writes_bytes_to_(sz, *bytesread)
void* buf,
size_t sz, _Out_ _Deref_out_range_(0, sz)
size_t* bytesread);
17 bool (*write)(_In_
void* self, _In_reads_bytes_(sz)
void* buf,
size_t sz, _Out_opt_ _Deref_out_range_(0, sz)
size_t* byteswritten);
18 int64 (*tell)(_In_
void* self);
19 int64 (*seek)(_In_
void* self, int64 off,
FSSeekType seektype);
20 bool (*flush)(_In_
void* self);
22extern VFSFileProvider VFSFileProvider_tmpl;
24typedef struct VFSProvider {
30 flags_t (*flags)(_In_
void* self);
32 _Ret_opt_valid_
ObjInst* (*open)(_In_
void* self, _In_opt_ strref path, flags_t flags);
34 bool (*setTimes)(_In_
void* self, _In_opt_ strref path, int64 modified, int64 accessed);
35 bool (*createDir)(_In_
void* self, _In_opt_ strref path);
36 bool (*removeDir)(_In_
void* self, _In_opt_ strref path);
37 bool (*deleteFile)(_In_
void* self, _In_opt_ strref path);
38 bool (*rename)(_In_
void* self, _In_opt_ strref oldpath, _In_opt_ strref newpath);
39 bool (*getFSPath)(_In_
void* self, _Inout_
string* out, _In_opt_ strref path);
40 bool (*searchInit)(_In_
void* self, _Out_
FSSearchIter* iter, _In_opt_ strref path, _In_opt_ strref pattern,
bool stat);
41 bool (*searchValid)(_In_
void* self, _In_
FSSearchIter* iter);
42 bool (*searchNext)(_In_
void* self, _Inout_
FSSearchIter* iter);
43 void (*searchFinish)(_In_
void* self, _Inout_
FSSearchIter* iter);
45extern VFSProvider VFSProvider_tmpl;
Low-level file I/O operations.
Platform-specific filesystem operations.
enum FSSeekTypeEnum FSSeekType
enum FSPathStatEnum FSPathStat
@ FS_Nonexistent
Path does not exist.
CX Object System - Object-oriented programming in C.