diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-13 15:47:30 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-13 15:47:30 -0500 |
commit | e9357bfd982b37672ed9c319956af32bf3db7856 (patch) | |
tree | ebc8d3d514725b9402f8316f92aafe2fe14fb22c /filesystem.h | |
parent | cdca3cc10dceda9580b2d87c2105c0654aa084fc (diff) |
view-only mode
Diffstat (limited to 'filesystem.h')
-rw-r--r-- | filesystem.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/filesystem.h b/filesystem.h index 2e561cd..6325bd7 100644 --- a/filesystem.h +++ b/filesystem.h @@ -8,8 +8,15 @@ typedef enum { FS_OTHER } FsType; +enum { + FS_PERMISSION_READ = 0x01, + FS_PERMISSION_WRITE = 0x02, +}; +typedef u8 FsPermission; + // returns what kind of thing this is. FsType fs_path_type(char const *path); +FsPermission fs_path_permission(char const *path); // Does this file exist? Returns false for directories. bool fs_file_exists(char const *path); // Returns a NULL-terminated array of the files/directories in this directory, or NULL if the directory does not exist. @@ -29,5 +36,6 @@ int fs_mkdir(char const *path); // -1 if we can't get the cwd for whatever reason. int fs_get_cwd(char *buf, size_t buflen); + #endif // FILESYSTEM_H_ |