Lines Matching defs:path
18 const char* path, char* buffer);
23 bool Init(const char* path)
25 size_t len = strlen(path);
29 strcpy(fPath, path);
89 remove_dir_contents(Path& path, bool force, bool removeAttributes)
92 DIR* dir = opendir(path.GetPath());
95 path.GetPath(), strerror(errno));
106 if (!path.PushLeaf(entry->d_name)) {
108 "entry: \"%s\"\n", path.GetPath(), entry->d_name);
112 remove_entry(path, true, force, removeAttributes);
114 path.PopLeaf();
121 path.GetPath(), strerror(errno));
130 remove_entry(Path& path, bool recursive, bool force, bool removeAttributes)
134 if (lstat(path.GetPath(), &st) < 0) {
139 fprintf(stderr, "Error: Failed to remove \"%s\": %s\n", path.GetPath(),
147 if (__get_attribute_dir_path(&st, path.GetPath(),
156 fprintf(stderr, "Error: \"%s\" is a directory.\n", path.GetPath());
161 remove_dir_contents(path, force, removeAttributes);
164 if (rmdir(path.GetPath()) < 0) {
166 path.GetPath(), strerror(errno));
171 if (unlink(path.GetPath()) < 0) {
173 path.GetPath(), strerror(errno));
223 Path path;
224 if (!path.Init(argv[argi])) {
225 fprintf(stderr, "Error: Invalid path: \"%s\".\n", argv[argi]);
229 remove_entry(path, recursive, force, true);