path-util: introduce path_find_first_component()

The function may be useful to iterate on each path component.
This commit is contained in:
Yu Watanabe
2021-05-28 13:41:23 +09:00
parent 340cd6b6f9
commit 0ee54dd4e2
3 changed files with 170 additions and 0 deletions
+1
View File
@@ -149,6 +149,7 @@ int fsck_exists(const char *fstype);
})
char* dirname_malloc(const char *path);
int path_find_first_component(const char **p, bool accept_dot_dot, const char **ret);
const char *last_path_component(const char *path);
int path_extract_filename(const char *p, char **ret);
int path_extract_directory(const char *p, char **ret);