Lines Matching refs:Path
101 std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const { in makeAbsolute()
106 return llvm::sys::fs::make_absolute(WorkingDir.get(), Path); in makeAbsolute()
109 bool FileSystem::exists(const Twine &Path) { in exists() argument
110 auto Status = status(Path); in exists()
182 ErrorOr<Status> status(const Twine &Path) override;
183 ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override;
187 std::error_code setCurrentWorkingDirectory(const Twine &Path) override;
191 ErrorOr<Status> RealFileSystem::status(const Twine &Path) { in status() argument
193 if (std::error_code EC = sys::fs::status(Path, RealStatus)) in status()
195 return Status::copyWithNewName(RealStatus, Path.str()); in status()
213 std::error_code RealFileSystem::setCurrentWorkingDirectory(const Twine &Path) { in setCurrentWorkingDirectory() argument
222 StringRef Dir = Path.toNullTerminatedStringRef(Storage); in setCurrentWorkingDirectory()
235 std::string Path; member in __anonb827f8de0311::RealFSDirIter
239 : Path(_Path.str()), Iter(Path, EC) { in RealFSDirIter()
284 ErrorOr<Status> OverlayFileSystem::status(const Twine &Path) { in status() argument
287 ErrorOr<Status> Status = (*I)->status(Path); in status()
295 OverlayFileSystem::openFileForRead(const llvm::Twine &Path) { in openFileForRead() argument
298 auto Result = (*I)->openFileForRead(Path); in openFileForRead()
311 OverlayFileSystem::setCurrentWorkingDirectory(const Twine &Path) { in setCurrentWorkingDirectory() argument
313 if (std::error_code EC = FS->setCurrentWorkingDirectory(Path)) in setCurrentWorkingDirectory()
323 std::string Path; member in __anonb827f8de0411::OverlayFSDirIterImpl
333 CurrentDirIter = (*CurrentFS)->dir_begin(Path, EC); in incrementFS()
369 OverlayFSDirIterImpl(const Twine &Path, OverlayFileSystem &FS, in OverlayFSDirIterImpl() argument
371 : Overlays(FS), Path(Path.str()), CurrentFS(Overlays.overlays_begin()) { in OverlayFSDirIterImpl()
372 CurrentDirIter = (*CurrentFS)->dir_begin(Path, EC); in OverlayFSDirIterImpl()
493 SmallString<128> Path; in addFile() local
494 P.toVector(Path); in addFile()
497 std::error_code EC = makeAbsolute(Path); in addFile()
502 llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in addFile()
504 if (Path.empty()) in addFile()
508 auto I = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); in addFile()
530 StringRef(Path.str().begin(), Name.end() - Path.str().begin()), in addFile()
566 SmallString<128> Path; in lookupInMemoryNode() local
567 P.toVector(Path); in lookupInMemoryNode()
570 std::error_code EC = FS.makeAbsolute(Path); in lookupInMemoryNode()
575 llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in lookupInMemoryNode()
577 if (Path.empty()) in lookupInMemoryNode()
580 auto I = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); in lookupInMemoryNode()
601 llvm::ErrorOr<Status> InMemoryFileSystem::status(const Twine &Path) { in status() argument
602 auto Node = lookupInMemoryNode(*this, Root.get(), Path); in status()
609 InMemoryFileSystem::openFileForRead(const Twine &Path) { in openFileForRead() argument
610 auto Node = lookupInMemoryNode(*this, Root.get(), Path); in openFileForRead()
736 VFSFromYamlDirIterImpl(const Twine &Path, RedirectingFileSystem &FS,
822 ErrorOr<Entry *> lookupPath(const Twine &Path);
830 ErrorOr<Status> status(const Twine &Path, Entry *E);
840 ErrorOr<Status> status(const Twine &Path) override;
841 ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override;
846 std::error_code setCurrentWorkingDirectory(const Twine &Path) override { in setCurrentWorkingDirectory() argument
847 return ExternalFS->setCurrentWorkingDirectory(Path); in setCurrentWorkingDirectory()
1217 SmallString<256> Path; in lookupPath() local
1218 Path_.toVector(Path); in lookupPath()
1221 if (std::error_code EC = makeAbsolute(Path)) in lookupPath()
1224 if (Path.empty()) in lookupPath()
1227 sys::path::const_iterator Start = sys::path::begin(Path); in lookupPath()
1228 sys::path::const_iterator End = sys::path::end(Path); in lookupPath()
1269 static Status getRedirectedFileStatus(const Twine &Path, bool UseExternalNames, in getRedirectedFileStatus() argument
1273 S = Status::copyWithNewName(S, Path.str()); in getRedirectedFileStatus()
1278 ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path, Entry *E) { in status() argument
1284 return getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), in status()
1289 return Status::copyWithNewName(DE->getStatus(), Path.str()); in status()
1293 ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path) { in status() argument
1294 ErrorOr<Entry *> Result = lookupPath(Path); in status()
1297 return status(Path, *Result); in status()
1322 RedirectingFileSystem::openFileForRead(const Twine &Path) { in openFileForRead() argument
1323 ErrorOr<Entry *> E = lookupPath(Path); in openFileForRead()
1340 Status S = getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), in openFileForRead()
1363 static bool pathHasTraversal(StringRef Path) { in pathHasTraversal() argument
1365 for (StringRef Comp : llvm::make_range(path::begin(Path), path::end(Path))) in pathHasTraversal()
1385 bool containedIn(StringRef Parent, StringRef Path);
1386 StringRef containedPart(StringRef Parent, StringRef Path);
1387 void startDirectory(StringRef Path);
1397 bool JSONWriter::containedIn(StringRef Parent, StringRef Path) { in containedIn() argument
1401 for (auto IChild = path::begin(Path), EChild = path::end(Path); in containedIn()
1410 StringRef JSONWriter::containedPart(StringRef Parent, StringRef Path) { in containedPart() argument
1412 assert(containedIn(Parent, Path)); in containedPart()
1413 return Path.slice(Parent.size() + 1, StringRef::npos); in containedPart()
1416 void JSONWriter::startDirectory(StringRef Path) { in startDirectory() argument
1418 DirStack.empty() ? Path : containedPart(DirStack.back(), Path); in startDirectory()
1419 DirStack.push_back(Path); in startDirectory()
1528 const Twine &Path, in recursive_directory_iterator() argument
1531 directory_iterator I = FS->dir_begin(Path, EC); in recursive_directory_iterator()