Lines Matching refs:path
91 int mkdir_p(char *path, mode_t mode)
95 char *d = path;
100 if (stat(path, &st) == 0)
107 err = stat(path, &st) && mkdir(path, mode);
114 return (stat(path, &st) && mkdir(path, mode)) ? -1 : 0;
136 * 0 - will remove only files under the 'path' directory
137 * 1 .. x - will dive in x-level deep under the 'path' directory
148 static int rm_rf_depth_pat(const char *path, int depth, const char **pat)
157 ret = lstat(path, &statbuf);
163 return unlink(path);
165 /* We have directory in path. */
166 dir = opendir(path);
181 path, d->d_name);
200 return rmdir(path);
203 static int rm_rf_kcore_dir(const char *path)
213 snprintf(kcore_dir_path, sizeof(kcore_dir_path), "%s/kcore_dir", path);
218 int rm_rf_perf_data(const char *path)
226 rm_rf_kcore_dir(path);
228 return rm_rf_depth_pat(path, 0, pat);
231 int rm_rf(const char *path)
233 return rm_rf_depth_pat(path, INT_MAX, NULL);