io: directory: implement temporary directories and delete-on-close
This commit is contained in:
@@ -22,6 +22,7 @@ typedef enum b_directory_iterator_flags {
|
||||
typedef enum b_directory_open_flags {
|
||||
B_DIRECTORY_OPEN_CREATE = 0x01u,
|
||||
B_DIRECTORY_OPEN_CREATE_INTERMEDIATE = 0x03u,
|
||||
B_DIRECTORY_OPEN_DELETE_ON_CLOSE = 0x04u,
|
||||
} b_directory_open_flags;
|
||||
|
||||
typedef struct b_directory_iterator {
|
||||
@@ -43,10 +44,12 @@ typedef struct b_directory_iterator {
|
||||
BLUE_API b_result b_directory_open(
|
||||
b_directory *root, const b_path *path, b_directory_open_flags flags,
|
||||
b_directory **out);
|
||||
BLUE_API b_result b_directory_open_temp(b_directory **out);
|
||||
BLUE_API const b_path *b_directory_get_path(const b_directory *dir);
|
||||
BLUE_API const b_path *b_directory_get_rel_path(const b_directory *dir);
|
||||
BLUE_API const char *b_directory_get_path_cstr(const b_directory *dir);
|
||||
BLUE_API const char *b_directory_get_rel_path_cstr(const b_directory *dir);
|
||||
BLUE_API b_result b_directory_delete(b_directory *dir);
|
||||
|
||||
BLUE_API bool b_directory_path_exists(const b_directory *root, const b_path *path);
|
||||
BLUE_API bool b_directory_path_is_file(const b_directory *root, const b_path *path);
|
||||
|
||||
Reference in New Issue
Block a user