Lines Matching refs:path
21 is_dir(const string& path) in is_dir() argument
25 err = stat(path.c_str(), &st); in is_dir()
30 remove_file(const string& path) in remove_file() argument
32 int err = unlink(path.c_str()); in remove_file()
34 fprintf(stderr, "error deleting file %s (%s)\n", path.c_str(), in remove_file()
42 remove_recursively(const string& path) in remove_recursively() argument
46 if (is_dir(path)) { in remove_recursively()
47 DIR *d = opendir(path.c_str()); in remove_recursively()
50 path.c_str(), strerror(errno)); in remove_recursively()
63 string full = path; in remove_recursively()
89 err = rmdir(path.c_str()); in remove_recursively()
91 fprintf(stderr, "error deleting directory %s (%s)\n", path.c_str(), in remove_recursively()
97 return remove_file(path); in remove_recursively()
102 mkdir_recursively(const string& path) in mkdir_recursively() argument
108 if (path.length() != 0 and path[0] == '/') pos++; in mkdir_recursively()
111 pos = path.find('/', pos); in mkdir_recursively()
112 string p = path.substr(0, pos); in mkdir_recursively()
119 path.c_str(), strerror(errno)); in mkdir_recursively()
125 path.c_str(), p.c_str()); in mkdir_recursively()
129 if (p == path) { in mkdir_recursively()
146 strip_file(const string& path) in strip_file() argument
175 return execlp(strip_cmd, strip_cmd, path.c_str(), (char *)NULL); in strip_file()
197 args[num_args] = path.c_str(); in strip_file()