CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
vfsprovider.h
Go to the documentation of this file.
1
3
4#pragma once
5// This header file is auto-generated!
6// Do not make changes to this file or they will be overwritten.
7// clang-format off
8#include <cx/obj.h>
9#include <cx/struct.h>
10#include <cx/fs/fs.h>
11#include <cx/fs/file.h>
12#include <cx/fs/fileobj.h>
13
14CX_C_BEGIN
15
16
17typedef struct VFSProvider {
18 ObjIface* _implements;
19 ObjIface* _parent;
20 size_t _size;
21
22 // VFSProviderFlags enforced for this provider
23 flags_t (*flags)(_In_ void* self);
24 // caller takes ownership of the returned file
25 _Ret_opt_valid_ File* (*open)(_In_ void* self, _In_opt_ strref path, flags_t flags);
26 FSPathStat (*stat)(_In_ void* self, _In_opt_ strref path, _When_(return != FS_Nonexistent, _Out_opt_) FSStat* stat);
27 bool (*setTimes)(_In_ void* self, _In_opt_ strref path, int64 modified, int64 accessed);
28 bool (*createDir)(_In_ void* self, _In_opt_ strref path);
29 bool (*removeDir)(_In_ void* self, _In_opt_ strref path);
30 bool (*deleteFile)(_In_ void* self, _In_opt_ strref path);
31 bool (*rename)(_In_ void* self, _In_opt_ strref oldpath, _In_opt_ strref newpath);
32 bool (*getFSPath)(_In_ void* self, _Inout_ string* out, _In_opt_ strref path);
33 bool (*searchInit)(_In_ void* self, _Out_ FSSearchIter* iter, _In_opt_ strref path, _In_opt_ strref pattern, bool stat);
34 bool (*searchValid)(_In_ void* self, _In_ FSSearchIter* iter);
35 bool (*searchNext)(_In_ void* self, _Inout_ FSSearchIter* iter);
36 void (*searchFinish)(_In_ void* self, _Inout_ FSSearchIter* iter);
37} VFSProvider;
38extern VFSProvider VFSProvider_tmpl;
39
40CX_C_END
Low-level file I/O operations.
Platform-specific filesystem operations.
enum FSPathStatEnum FSPathStat
@ FS_Nonexistent
Path does not exist.
Definition fs.h:94
CX Struct System - Introspectable, serializable POD structures in C.
CX Object System - Object-oriented programming in C.
Definition fs.h:103
Definition fileobj.h:59