59#define PATH_COMPONENT_DOT '.'
66#define PATH_COMPONENT_DOTDOT ".."
78#define PATH_DRIVE_SEPARATOR ':'
85#define MAX_PATH_BASES 16
asciichat_error_t
Error and exit codes - unified status values (0-255)
bool path_looks_like_path(const char *value)
Determine if a string is likely intended to reference the filesystem.
char * get_log_dir(void)
Get log directory path appropriate for current build type.
path_role_t
Classification for user-supplied filesystem paths.
bool path_is_absolute(const char *path)
Determine whether a path is absolute on the current platform.
asciichat_error_t path_validate_user_path(const char *input, path_role_t role, char **normalized_out)
Validate and canonicalize a user-supplied filesystem path.
char * expand_path(const char *path)
Expand path with tilde (~) support.
bool path_is_within_base(const char *path, const char *base)
Check whether a path resides within a specified base directory.
char * get_config_dir(void)
Get configuration directory path with XDG_CONFIG_HOME support.
bool path_is_within_any_base(const char *path, const char *const *bases, size_t base_count)
Check whether a path resides within any of several base directories.
const char * extract_project_relative_path(const char *file)
Extract relative path from an absolute path.
bool path_normalize_copy(const char *path, char *out, size_t out_len)
Normalize a path and copy it into the provided buffer.