Expose interface for querying access rules on coral::fs
This commit is contained in:
parent
2f884f92a1
commit
2b1a34d5e2
|
@ -122,8 +122,22 @@ export namespace coral {
|
|||
* Platform-generalized file system interface.
|
||||
*/
|
||||
struct fs {
|
||||
/**
|
||||
* Descriptor of the various rules that the file-system enforces over access to its files.
|
||||
*/
|
||||
struct access_rules {
|
||||
bool can_read;
|
||||
|
||||
bool can_write;
|
||||
};
|
||||
|
||||
virtual ~fs() {};
|
||||
|
||||
/**
|
||||
* Queries the file-system for its global [access_rules], returning them.
|
||||
*/
|
||||
virtual access_rules query_access() = 0;
|
||||
|
||||
/**
|
||||
* Attempts to read the file in the file system located at `file_path` relative, calling
|
||||
* `then` if it was successfully opened for reading.
|
||||
|
|
Loading…
Reference in New Issue