33 lines
974 B
C
33 lines
974 B
C
#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_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_path *b_path_join(const b_path *paths[], size_t nr_paths);
|
|
|
|
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 const char *b_path_ptr(const b_path *path);
|
|
|
|
BLUE_API b_path *b_path_retain(b_path *path);
|
|
BLUE_API void b_path_release(b_path *path);
|
|
|
|
#endif
|