Lines Matching full:path

13 #include "llvm/Support/Path.h"
34 static bool isCaseSensitivePath(StringRef Path) { in isCaseSensitivePath() argument
35 SmallString<256> TmpDest = Path, UpperDest, RealDest; in isCaseSensitivePath()
38 if (sys::fs::real_path(Path, TmpDest)) in isCaseSensitivePath()
40 Path = TmpDest; in isCaseSensitivePath()
42 // Change path to all upper case and ask for its real path, if the latter in isCaseSensitivePath()
43 // exists and is equal to path, it's not case sensitive. Default to case in isCaseSensitivePath()
46 UpperDest = Path.upper(); in isCaseSensitivePath()
47 if (!sys::fs::real_path(UpperDest, RealDest) && Path == RealDest) in isCaseSensitivePath()
54 assert(sys::path::is_absolute(Root) && "Root not absolute"); in FileCollector()
55 assert(sys::path::is_absolute(OverlayRoot) && "OverlayRoot not absolute"); in FileCollector()
59 SmallVectorImpl<char> &Path) { in updateWithRealPath() argument
60 StringRef SrcPath(Path.begin(), Path.size()); in updateWithRealPath()
61 StringRef Filename = sys::path::filename(SrcPath); in updateWithRealPath()
62 StringRef Directory = sys::path::parent_path(SrcPath); in updateWithRealPath()
65 // part of the path, caching the search because computing the real path is in updateWithRealPath()
79 // Finish recreating the path by appending the original filename, since we in updateWithRealPath()
84 sys::path::append(RealPath, Filename); in updateWithRealPath()
87 Path.swap(RealPath); in updateWithRealPath()
90 /// Make Path absolute.
91 static void makeAbsolute(SmallVectorImpl<char> &Path) { in makeAbsolute() argument
92 // We need an absolute src path to append to the root. in makeAbsolute()
93 sys::fs::make_absolute(Path); in makeAbsolute()
95 // Canonicalize src to a native path to avoid mixed separator styles. in makeAbsolute()
96 sys::path::native(Path); in makeAbsolute()
99 Path.erase(Path.begin(), sys::path::remove_leading_dotslash( in makeAbsolute()
100 StringRef(Path.begin(), Path.size())) in makeAbsolute()
111 // lead to the wrong real destination path. Let the source be canonicalized in canonicalize()
112 // like that but make sure we always use the real path for the destination. in canonicalize()
116 // Canonicalize the virtual path by removing "..", "." components. in canonicalize()
117 sys::path::remove_dots(Paths.VirtualPath, /*remove_dot_dot=*/true); in canonicalize()
126 sys::path::append(DstPath, sys::path::relative_path(Paths.CopyFrom)); in addFileImpl()
128 // Always map a canonical src path to its real path into the YAML, by doing in addFileImpl()
148 addFile(It->path()); in addDirectoryImpl()
201 sys::fs::create_directories(sys::path::parent_path(entry.RPath), in copyFiles()
263 llvm::ErrorOr<llvm::vfs::Status> status(const Twine &Path) override { in status() argument
264 auto Result = FS->status(Path); in status()
266 Collector->addFile(Path); in status()
271 openFileForRead(const Twine &Path) override { in openFileForRead() argument
272 auto Result = FS->openFileForRead(Path); in openFileForRead()
274 Collector->addFile(Path); in openFileForRead()
283 std::error_code getRealPath(const Twine &Path, in getRealPath() argument
285 auto EC = FS->getRealPath(Path, Output); in getRealPath()
287 Collector->addFile(Path); in getRealPath()
294 std::error_code isLocal(const Twine &Path, bool &Result) override { in isLocal() argument
295 return FS->isLocal(Path, Result); in isLocal()
302 std::error_code setCurrentWorkingDirectory(const llvm::Twine &Path) override { in setCurrentWorkingDirectory() argument
303 return FS->setCurrentWorkingDirectory(Path); in setCurrentWorkingDirectory()