Lines Matching refs:path
21 is_dir(const string& path)
25 err = stat(path.c_str(), &st);
30 remove_file(const string& path)
32 int err = unlink(path.c_str());
34 fprintf(stderr, "error deleting file %s (%s)\n", path.c_str(),
42 remove_recursively(const string& path)
46 if (is_dir(path)) {
47 DIR *d = opendir(path.c_str());
50 path.c_str(), strerror(errno));
63 string full = path;
96 err = rmdir(path.c_str());
98 fprintf(stderr, "error deleting directory %s (%s)\n", path.c_str(),
104 return remove_file(path);
109 mkdir_recursively(const string& path)
115 if (path.length() != 0 and path[0] == '/') pos++;
118 pos = path.find('/', pos);
119 string p = path.substr(0, pos);
126 path.c_str(), strerror(errno));
132 path.c_str(), p.c_str());
136 if (p == path) {
153 strip_file(const string& path)
182 return execlp(strip_cmd, strip_cmd, path.c_str(), (char *)NULL);
204 args[num_args] = path.c_str();