Lines Matching refs:Path

123 std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const {  in makeAbsolute()
124 if (llvm::sys::path::is_absolute(Path)) in makeAbsolute()
131 llvm::sys::fs::make_absolute(WorkingDir.get(), Path); in makeAbsolute()
135 std::error_code FileSystem::getRealPath(const Twine &Path, in getRealPath() argument
140 std::error_code FileSystem::isLocal(const Twine &Path, bool &Result) { in isLocal() argument
144 bool FileSystem::exists(const Twine &Path) { in exists() argument
145 auto Status = status(Path); in exists()
154 static bool pathHasTraversal(StringRef Path) { in pathHasTraversal() argument
157 for (StringRef Comp : llvm::make_range(path::begin(Path), path::end(Path))) in pathHasTraversal()
235 ErrorOr<Status> status(const Twine &Path) override;
236 ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override;
240 std::error_code setCurrentWorkingDirectory(const Twine &Path) override;
241 std::error_code isLocal(const Twine &Path, bool &Result) override;
242 std::error_code getRealPath(const Twine &Path,
252 ErrorOr<Status> RealFileSystem::status(const Twine &Path) { in status() argument
254 if (std::error_code EC = sys::fs::status(Path, RealStatus)) in status()
256 return Status::copyWithNewName(RealStatus, Path.str()); in status()
280 std::error_code RealFileSystem::setCurrentWorkingDirectory(const Twine &Path) { in setCurrentWorkingDirectory() argument
288 if (auto EC = llvm::sys::fs::set_current_path(Path)) in setCurrentWorkingDirectory()
297 std::error_code RealFileSystem::isLocal(const Twine &Path, bool &Result) { in isLocal() argument
298 return llvm::sys::fs::is_local(Path, Result); in isLocal()
302 RealFileSystem::getRealPath(const Twine &Path, in getRealPath() argument
304 return llvm::sys::fs::real_path(Path, Output); in getRealPath()
318 RealFSDirIter(const Twine &Path, std::error_code &EC) : Iter(Path, EC) { in RealFSDirIter() argument
355 ErrorOr<Status> OverlayFileSystem::status(const Twine &Path) { in status() argument
358 ErrorOr<Status> Status = (*I)->status(Path); in status()
366 OverlayFileSystem::openFileForRead(const llvm::Twine &Path) { in openFileForRead() argument
369 auto Result = (*I)->openFileForRead(Path); in openFileForRead()
383 OverlayFileSystem::setCurrentWorkingDirectory(const Twine &Path) { in setCurrentWorkingDirectory() argument
385 if (std::error_code EC = FS->setCurrentWorkingDirectory(Path)) in setCurrentWorkingDirectory()
390 std::error_code OverlayFileSystem::isLocal(const Twine &Path, bool &Result) { in isLocal() argument
392 if (FS->exists(Path)) in isLocal()
393 return FS->isLocal(Path, Result); in isLocal()
398 OverlayFileSystem::getRealPath(const Twine &Path, in getRealPath() argument
401 if (FS->exists(Path)) in getRealPath()
402 return FS->getRealPath(Path, Output); in getRealPath()
412 std::string Path; member in __anon49858f0d0411::OverlayFSDirIterImpl
422 CurrentDirIter = (*CurrentFS)->dir_begin(Path, EC); in incrementFS()
458 OverlayFSDirIterImpl(const Twine &Path, OverlayFileSystem &FS, in OverlayFSDirIterImpl() argument
460 : Overlays(FS), Path(Path.str()), CurrentFS(Overlays.overlays_begin()) { in OverlayFSDirIterImpl()
461 CurrentDirIter = (*CurrentFS)->dir_begin(Path, EC); in OverlayFSDirIterImpl()
534 InMemoryHardLink(StringRef Path, const InMemoryFile &ResolvedFile) in InMemoryHardLink() argument
535 : InMemoryNode(Path, IME_HardLink), ResolvedFile(ResolvedFile) {} in InMemoryHardLink()
654 SmallString<128> Path; in addFile() local
655 P.toVector(Path); in addFile()
658 std::error_code EC = makeAbsolute(Path); in addFile()
663 llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in addFile()
665 if (Path.empty()) in addFile()
669 auto I = llvm::sys::path::begin(Path), E = sys::path::end(Path); in addFile()
707 StringRef(Path.str().begin(), Name.end() - Path.str().begin()), in addFile()
764 SmallString<128> Path; in lookupInMemoryNode() local
765 P.toVector(Path); in lookupInMemoryNode()
768 std::error_code EC = FS.makeAbsolute(Path); in lookupInMemoryNode()
773 llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in lookupInMemoryNode()
775 if (Path.empty()) in lookupInMemoryNode()
778 auto I = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path); in lookupInMemoryNode()
817 llvm::ErrorOr<Status> InMemoryFileSystem::status(const Twine &Path) { in status() argument
818 auto Node = lookupInMemoryNode(*this, Root.get(), Path); in status()
820 return detail::getNodeStatus(*Node, Path.str()); in status()
825 InMemoryFileSystem::openFileForRead(const Twine &Path) { in openFileForRead() argument
826 auto Node = lookupInMemoryNode(*this, Root.get(), Path); in openFileForRead()
834 new detail::InMemoryFileAdaptor(*F, Path.str())); in openFileForRead()
850 SmallString<256> Path(RequestedDirName); in setCurrentEntry() local
851 llvm::sys::path::append(Path, I->second->getFileName()); in setCurrentEntry()
862 CurrentEntry = directory_entry(Path.str(), Type); in setCurrentEntry()
906 SmallString<128> Path; in setCurrentWorkingDirectory() local
907 P.toVector(Path); in setCurrentWorkingDirectory()
910 std::error_code EC = makeAbsolute(Path); in setCurrentWorkingDirectory()
915 llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in setCurrentWorkingDirectory()
917 if (!Path.empty()) in setCurrentWorkingDirectory()
918 WorkingDirectory = Path.str(); in setCurrentWorkingDirectory()
923 InMemoryFileSystem::getRealPath(const Twine &Path, in getRealPath() argument
928 Path.toVector(Output); in getRealPath()
935 std::error_code InMemoryFileSystem::isLocal(const Twine &Path, bool &Result) { in isLocal() argument
983 const Twine &Path,
997 RedirectingFileSystem::setCurrentWorkingDirectory(const Twine &Path) { in setCurrentWorkingDirectory() argument
998 return ExternalFS->setCurrentWorkingDirectory(Path); in setCurrentWorkingDirectory()
1001 std::error_code RedirectingFileSystem::isLocal(const Twine &Path, in isLocal() argument
1003 return ExternalFS->isLocal(Path, Result); in isLocal()
1263 SmallString<256> Path(Value); in parseEntry() local
1266 Path = sys::path::remove_leading_dotslash(Path); in parseEntry()
1267 sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in parseEntry()
1268 Name = Path.str(); in parseEntry()
1557 SmallString<256> Path; in lookupPath() local
1558 Path_.toVector(Path); in lookupPath()
1561 if (std::error_code EC = makeAbsolute(Path)) in lookupPath()
1568 Path = sys::path::remove_leading_dotslash(Path); in lookupPath()
1569 sys::path::remove_dots(Path, /*remove_dot_dot=*/true); in lookupPath()
1572 if (Path.empty()) in lookupPath()
1575 sys::path::const_iterator Start = sys::path::begin(Path); in lookupPath()
1576 sys::path::const_iterator End = sys::path::end(Path); in lookupPath()
1632 static Status getRedirectedFileStatus(const Twine &Path, bool UseExternalNames, in getRedirectedFileStatus() argument
1636 S = Status::copyWithNewName(S, Path.str()); in getRedirectedFileStatus()
1641 ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path, in status() argument
1648 return getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), in status()
1653 return Status::copyWithNewName(DE->getStatus(), Path.str()); in status()
1657 ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path) { in status() argument
1658 ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Path); in status()
1662 return ExternalFS->status(Path); in status()
1666 return status(Path, *Result); in status()
1695 RedirectingFileSystem::openFileForRead(const Twine &Path) { in openFileForRead() argument
1696 ErrorOr<RedirectingFileSystem::Entry *> E = lookupPath(Path); in openFileForRead()
1700 return ExternalFS->openFileForRead(Path); in openFileForRead()
1718 Status S = getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), in openFileForRead()
1725 RedirectingFileSystem::getRealPath(const Twine &Path, in getRealPath() argument
1727 ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Path); in getRealPath()
1731 return ExternalFS->getRealPath(Path, Output); in getRealPath()
1742 return IsFallthrough ? ExternalFS->getRealPath(Path, Output) in getRealPath()
1757 SmallVectorImpl<StringRef> &Path, in getVFSEntries() argument
1765 Path.push_back(SubEntry->getName()); in getVFSEntries()
1766 getVFSEntries(SubEntry.get(), Path, Entries); in getVFSEntries()
1767 Path.pop_back(); in getVFSEntries()
1776 for (auto &Comp : Path) in getVFSEntries()
1821 bool containedIn(StringRef Parent, StringRef Path);
1822 StringRef containedPart(StringRef Parent, StringRef Path);
1823 void startDirectory(StringRef Path);
1837 bool JSONWriter::containedIn(StringRef Parent, StringRef Path) { in containedIn() argument
1842 for (auto IChild = path::begin(Path), EChild = path::end(Path); in containedIn()
1851 StringRef JSONWriter::containedPart(StringRef Parent, StringRef Path) { in containedPart() argument
1853 assert(containedIn(Parent, Path)); in containedPart()
1854 return Path.slice(Parent.size() + 1, StringRef::npos); in containedPart()
1857 void JSONWriter::startDirectory(StringRef Path) { in startDirectory() argument
1859 DirStack.empty() ? Path : containedPart(DirStack.back(), Path); in startDirectory()
1860 DirStack.push_back(Path); in startDirectory()
2036 FileSystem &FS_, const Twine &Path, std::error_code &EC) in recursive_directory_iterator() argument
2038 directory_iterator I = FS->dir_begin(Path, EC); in recursive_directory_iterator()