66size_t cwk_path_get_absolute(
const char *base,
const char *path,
char *buffer,
86size_t cwk_path_get_relative(
const char *base_directory,
const char *path,
87 char *buffer,
size_t buffer_size);
106size_t cwk_path_join(
const char *path_a,
const char *path_b,
char *buffer,
126size_t cwk_path_join_multiple(
const char **paths,
char *buffer,
139void cwk_path_get_root(
const char *path,
size_t *length);
158size_t cwk_path_change_root(
const char *path,
const char *new_root,
159 char *buffer,
size_t buffer_size);
170bool cwk_path_is_absolute(
const char *path);
181bool cwk_path_is_relative(
const char *path);
196void cwk_path_get_basename(
const char *path,
const char **basename,
217size_t cwk_path_change_basename(
const char *path,
const char *new_basename,
218 char *buffer,
size_t buffer_size);
231void cwk_path_get_dirname(
const char *path,
size_t *length);
248bool cwk_path_get_extension(
const char *path,
const char **extension,
260bool cwk_path_has_extension(
const char *path);
282size_t cwk_path_change_extension(
const char *path,
const char *new_extension,
283 char *buffer,
size_t buffer_size);
307size_t cwk_path_normalize(
const char *path,
char *buffer,
size_t buffer_size);
320size_t cwk_path_get_intersection(
const char *path_base,
const char *path_other);
333bool cwk_path_get_first_segment(
const char *path,
struct cwk_segment *segment);
348bool cwk_path_get_last_segment(
const char *path,
struct cwk_segment *segment);
360bool cwk_path_get_next_segment(
struct cwk_segment *segment);
373bool cwk_path_get_previous_segment(
struct cwk_segment *segment);
386enum cwk_segment_type cwk_path_get_segment_type(
406size_t cwk_path_change_segment(
struct cwk_segment *segment,
const char *value,
407 char *buffer,
size_t buffer_size);
420bool cwk_path_is_separator(
const char *str);
432enum cwk_path_style cwk_path_guess_style(
const char *path);
445void cwk_path_set_style(
enum cwk_path_style style);
455enum cwk_path_style cwk_path_get_style(
void);
A segment represents a single component of a path.