6 * tal/path - routines to manipulate paths
8 * This code helps manage paths.
11 * Author: Rusty Russell <rusty@rustcorp.com.au>
14 * // Program to print out full path names, recursively.
15 * #include <ccan/tal/path/path.h>
16 * #include <sys/types.h>
19 * #include <ccan/err/err.h>
21 * static void dump(const char *dir)
24 * DIR *d = opendir(dir);
26 * warn("Failed to open %s", dir);
29 * printf("%s\n", dir);
30 * while ((di = readdir(d)) != NULL) {
32 * if (streq(di->d_name, ".") || streq(di->d_name, ".."))
34 * path = path_join(NULL, dir, di->d_name);
35 * if (path_is_dir(path))
44 * dump(path_cwd(NULL));
48 int main(int argc, char *argv[])
50 /* Expect exactly one argument */
54 if (strcmp(argv[1], "depends") == 0) {
56 printf("ccan/take\n");
58 printf("ccan/tal/str\n");