5 * tal/path - routines to manipulate paths
7 * This code helps manage paths.
10 * Author: Rusty Russell <rusty@rustcorp.com.au>
13 * // Program to print out full path names, recursively.
14 * #include <ccan/tal/path/path.h>
15 * #include <sys/types.h>
18 * #include <ccan/err/err.h>
20 * static void dump(const char *dir)
23 * DIR *d = opendir(dir);
25 * warn("Failed to open %s", dir);
28 * printf("%s\n", dir);
29 * while ((di = readdir(d)) != NULL) {
31 * if (streq(di->d_name, ".") || streq(di->d_name, ".."))
33 * path = path_join(NULL, dir, di->d_name);
34 * if (path_is_dir(path))
43 * dump(path_cwd(NULL));
47 int main(int argc, char *argv[])
49 /* Expect exactly one argument */
53 if (strcmp(argv[1], "depends") == 0) {
55 printf("ccan/take\n");
57 printf("ccan/tal/str\n");