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()
96 err = rmdir(path.c_str()); in remove_recursively()
98 fprintf(stderr, "error deleting directory %s (%s)\n", path.c_str(), in remove_recursively()
104 return remove_file(path); in remove_recursively()
109 mkdir_recursively(const string& path) in mkdir_recursively() argument
115 if (path.length() != 0 and path[0] == '/') pos++; in mkdir_recursively()
118 pos = path.find('/', pos); in mkdir_recursively()
119 string p = path.substr(0, pos); in mkdir_recursively()
126 path.c_str(), strerror(errno)); in mkdir_recursively()
132 path.c_str(), p.c_str()); in mkdir_recursively()
136 if (p == path) { in mkdir_recursively()
153 strip_file(const string& path) in strip_file() argument
182 return execlp(strip_cmd, strip_cmd, path.c_str(), (char *)NULL); in strip_file()
204 args[num_args] = path.c_str(); in strip_file()