Lines Matching defs:Path
13 #include "llvm/Support/Path.h"
48 ErrorOr<vfs::Status> status(const Twine &Path) override {
50 FilesAndDirs.find(Path.str());
56 openFileForRead(const Twine &Path) override {
57 auto S = status(Path);
65 std::error_code setCurrentWorkingDirectory(const Twine &Path) override {
72 std::string Path;
74 if (Path.size() < S.size() && S.find(Path) == 0) {
76 if (LastSep == Path.size() || LastSep == Path.size()-1)
84 Path(_Path.str()) {
112 void addEntry(StringRef Path, const vfs::Status &Status) {
113 FilesAndDirs[Path] = Status;
116 void addRegularFile(StringRef Path, sys::fs::perms Perms = sys::fs::all_all) {
117 vfs::Status S(Path, UniqueID(FSID, FileID++), sys::TimeValue::now(), 0, 0,
119 addEntry(Path, S);
122 void addDirectory(StringRef Path, sys::fs::perms Perms = sys::fs::all_all) {
123 vfs::Status S(Path, UniqueID(FSID, FileID++), sys::TimeValue::now(), 0, 0,
125 addEntry(Path, S);
128 void addSymlink(StringRef Path) {
129 vfs::Status S(Path, UniqueID(FSID, FileID++), sys::TimeValue::now(), 0, 0,
131 addEntry(Path, S);
285 SmallString<128> Path;
289 EC = llvm::sys::fs::createUniqueDirectory(Name, Path);
291 Path = Name.str();
292 EC = llvm::sys::fs::create_directory(Twine(Path));
295 Path = "";
299 if (Path != "")
300 EXPECT_FALSE(llvm::sys::fs::remove(Path.str()));
302 operator StringRef() { return Path.str(); }
663 // a legal *absolute* path on Windows as well as *nix.
980 " { 'type': 'file', 'name': '//root/path/to/file',\n"
984 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
985 EXPECT_FALSE(FS->status("//root/path/to").getError());
986 EXPECT_FALSE(FS->status("//root/path").getError());
992 " { 'type': 'directory', 'name': '//root/path/to',\n"
997 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
998 EXPECT_FALSE(FS->status("//root/path/to").getError());
999 EXPECT_FALSE(FS->status("//root/path").getError());
1006 " 'contents': [ { 'type': 'file', 'name': 'path/to/file',\n"
1010 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
1011 EXPECT_FALSE(FS->status("//root/path/to").getError());
1012 EXPECT_FALSE(FS->status("//root/path").getError());
1023 " { 'type': 'directory', 'name': '//root/path/to////',\n"
1028 EXPECT_FALSE(FS->status("//root/path/to/file").getError());
1029 EXPECT_FALSE(FS->status("//root/path/to").getError());
1030 EXPECT_FALSE(FS->status("//root/path").getError());