Lines Matching refs:path

41   virtual bool IsTrue(const string& path, unsigned char type) const = 0;
56 virtual bool IsTrue(const string& path, unsigned char) const override {
57 return fnmatch(name_.c_str(), Basename(path).data(), 0) == 0;
93 virtual bool IsTrue(const string& path, unsigned char type) const override {
94 return !c_->IsTrue(path, type);
111 virtual bool IsTrue(const string& path, unsigned char type) const override {
112 if (c1_->IsTrue(path, type))
113 return c2_->IsTrue(path, type);
131 virtual bool IsTrue(const string& path, unsigned char type) const override {
132 if (!c1_->IsTrue(path, type))
133 return c2_->IsTrue(path, type);
154 string* path,
168 const string& path,
172 if (fc.print_cond && !fc.print_cond->IsTrue(path, type))
176 out.push_back(path);
189 string* path,
192 PrintIfNecessary(fc, *path, type_, d, out);
205 const string& path,
208 const auto& p = cur_read_dirs->emplace(n, path);
259 string* path,
262 ScopedReadDirTracker srdt(this, *path, cur_read_dirs);
266 path->c_str(), srdt.conflicted().c_str());
270 fc.read_dirs->insert(*path);
272 if (fc.prune_cond && fc.prune_cond->IsTrue(*path, DT_DIR)) {
274 out.push_back(*path);
279 PrintIfNecessary(fc, *path, DT_DIR, d, out);
284 size_t orig_path_size = path->size();
292 if ((*path)[path->size()-1] != '/')
293 *path += '/';
294 *path += c->base();
295 if (!c->RunFind(fc, loc, d + 1, path, cur_read_dirs, out))
297 path->resize(orig_path_size);
307 fc.read_dirs->erase(*path);
320 if ((*path)[path->size()-1] != '/')
321 *path += '/';
322 *path += c->base();
323 if (!c->RunFind(fc, loc, d + 1, path, cur_read_dirs, out))
325 path->resize(orig_path_size);
330 if ((*path)[path->size()-1] != '/')
331 *path += '/';
332 *path += c->base();
333 if (!c->RunFind(fc, loc, d + 1, path, cur_read_dirs, out))
335 path->resize(orig_path_size);
364 string* path,
372 path->c_str(), strerror(errno_));
378 LOG("FindEmulator does not support %s", path->c_str());
382 return to_->RunFind(fc, loc, d, path, cur_read_dirs, out);
384 PrintIfNecessary(fc, *path, type, d, out);
859 string path = finddir;
861 if (!base->RunFind(fc, loc, 0, &path, &cur_read_dirs, results)) {
910 static unsigned char GetDtType(const string& path) {
912 if (lstat(path.c_str(), &st)) {
913 PERROR("stat for %s", path.c_str());
918 DirentNode* ConstructDirectoryTree(const string& path) {
919 DIR* dir = opendir(path.empty() ? "." : path.c_str());
922 LOG("opendir failed: %s", path.c_str());
925 PERROR("opendir failed: %s", path.c_str());
929 DirentDirNode* n = new DirentDirNode(path);
939 string npath = path;
940 if (!path.empty())
974 const string& path = p.first;
979 ssize_t len = readlink(path.c_str(), buf, PATH_MAX);
981 WARN("readlink failed: %s", path.c_str());
988 if (stat(path.c_str(), &st) == 0) {
992 LOG("stat failed: %s: %s", path.c_str(), strerror(errno));
996 const string npath = ConcatDir(Dirname(path), buf);
1006 if (path.find('/') == string::npos) {
1007 DirentNode* dir = ConstructDirectoryTree(path);
1015 s->set_to(new DirentFileNode(path, type));