#include <libc.h>Go to the source code of this file.
Defines | |
| #define | __CONVEN_PATH_H__ 1 |
| #define | PATHOPT_CATWD (1<<0u) |
| #define | PATHOPT_SIMPLIFY (1<<1u) |
| #define | PATHOPT_DEBUG (1<<2u) |
Typedefs | |
| typedef int(* | t_path_gate_fn )(char *npath, int *gate_returned) |
Functions | |
| char ** | path_split (char *path, char sep) |
| int | path_simplify (char *path) |
| int | userland_path_gate (char *npath, int *gate_returned) |
| char * | path_treat (char *path, u_int32_t opts, char *wd, t_path_gate_fn path_gate, int *gate_returned, char *s) |
|
|
|
|
|
catenates workdir |
|
|
debug info is printed |
|
|
simplify path |
|
|
|
|
|
simplifies path - removes /./ or // returns 0 if OK else -1 and fills errno |
|
||||||||||||
|
splits a path in pieces e.g: "//foo//bar" becomes {"", "", "foo", "", "bar", NULL} returns NULL if a memory problem was encountered |
|
||||||||||||||||||||||||||||
|
treat a path before any operations on it - should be called before any path lookup: (see options). If OK returns newly allocated pointer, else returns NULL and errno filled.
|
|
||||||||||||
|
|
1.4.6