meta: add module for disk I/O functionality
This commit is contained in:
25
io/include/blue/io/path.h
Normal file
25
io/include/blue/io/path.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef BLUELIB_IO_PATH_H_
|
||||
#define BLUELIB_IO_PATH_H_
|
||||
|
||||
#include <blue/core/misc.h>
|
||||
#include <blue/core/status.h>
|
||||
#include <blue/object/object.h>
|
||||
#include <stddef.h>
|
||||
|
||||
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_status b_path_join(const b_path *paths[], size_t nr_paths, b_path **out);
|
||||
|
||||
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_retain(b_path *path);
|
||||
BLUE_API void b_path_release(b_path *path);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user