io: implement path manipulation on windows

This commit is contained in:
2025-02-10 21:17:01 +00:00
parent 4c3cc27d08
commit 3fe2fa7d60
5 changed files with 320 additions and 9 deletions

View File

@@ -8,16 +8,21 @@
typedef struct b_path b_path;
BLUE_API b_status b_path_create(b_path **out);
BLUE_API b_status b_path_create_root(b_path **out);
BLUE_API b_status b_path_create_cwd(b_path **out);
BLUE_API b_status b_path_create_from_cstr(const char *path, b_path **out);
BLUE_API b_path *b_path_create();
BLUE_API b_path *b_path_create_root();
BLUE_API b_path *b_path_create_cwd();
BLUE_API b_path *b_path_create_from_cstr(const char *path);
BLUE_API b_status b_path_join(const b_path *paths[], size_t nr_paths, b_path **out);
BLUE_API b_path *b_path_join(const b_path *paths[], size_t nr_paths);
BLUE_API b_status b_path_make_absolute(const b_path *in, b_path **out);
BLUE_API b_status b_path_make_relative(const b_path *in, b_path **out);
BLUE_API b_status b_path_make_canonical(const b_path *in, b_path **out);
BLUE_API b_path *b_path_make_absolute(const b_path *in);
BLUE_API b_path *b_path_make_relative(const b_path *in);
BLUE_API b_path *b_path_make_canonical(const b_path *in);
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 b_path *b_path_retain(b_path *path);
BLUE_API void b_path_release(b_path *path);