io: implement stat'ing paths, files, and directory contents

This commit is contained in:
2025-02-14 22:06:24 +00:00
parent 61848aadd7
commit bf83831cee
9 changed files with 257 additions and 46 deletions

View File

@@ -8,6 +8,8 @@
#define B_PATH(p) ((b_path *)p)
struct b_file_info;
typedef struct b_path b_path;
BLUE_API b_path *b_path_create();
@@ -25,6 +27,7 @@ BLUE_API bool b_path_is_absolute(const b_path *path);
BLUE_API bool b_path_exists(const b_path *path);
BLUE_API bool b_path_is_file(const b_path *path);
BLUE_API bool b_path_is_directory(const b_path *path);
BLUE_API enum b_status b_path_stat(const b_path *path, struct b_file_info *out);
BLUE_API const char *b_path_ptr(const b_path *path);
BLUE_API size_t b_path_length(const b_path *path);