Lines Matching refs:Path
226 i.Path = path; in begin()
235 i.Path = path; in end()
241 assert(Position < Path.size() && "Tried to increment past end!"); in operator ++()
247 if (Position == Path.size()) { in operator ++()
258 if (is_separator(Path[Position], S)) { in operator ++()
263 Component = Path.substr(Position, 1); in operator ++()
268 while (Position != Path.size() && is_separator(Path[Position], S)) { in operator ++()
273 if (Position == Path.size() && Component != "/") { in operator ++()
281 size_t end_pos = Path.find_first_of(separators(S), Position); in operator ++()
282 Component = Path.slice(Position, end_pos); in operator ++()
288 return Path.begin() == RHS.Path.begin() && Position == RHS.Position; in operator ==()
295 reverse_iterator rbegin(StringRef Path, Style style) { in rbegin() argument
297 I.Path = Path; in rbegin()
298 I.Position = Path.size(); in rbegin()
304 reverse_iterator rend(StringRef Path) { in rend() argument
306 I.Path = Path; in rend()
307 I.Component = Path.substr(0, 0); in rend()
313 size_t root_dir_pos = root_dir_start(Path, S); in operator ++()
318 is_separator(Path[end_pos - 1], S)) in operator ++()
322 if (Position == Path.size() && !Path.empty() && in operator ++()
323 is_separator(Path.back(), S) && in operator ++()
331 size_t start_pos = filename_pos(Path.substr(0, end_pos), S); in operator ++()
332 Component = Path.slice(start_pos, end_pos); in operator ++()
338 return Path.begin() == RHS.Path.begin() && Component == RHS.Component && in operator ==()
497 static bool starts_with(StringRef Path, StringRef Prefix, in starts_with() argument
501 if (Path.size() < Prefix.size()) in starts_with()
504 bool SepPath = is_separator(Path[I], style); in starts_with()
508 if (!SepPath && toLower(Path[I]) != toLower(Prefix[I])) in starts_with()
513 return Path.startswith(Prefix); in starts_with()
516 bool replace_path_prefix(SmallVectorImpl<char> &Path, StringRef OldPrefix, in replace_path_prefix() argument
521 StringRef OrigPath(Path.begin(), Path.size()); in replace_path_prefix()
527 llvm::copy(NewPrefix, Path.begin()); in replace_path_prefix()
534 Path.swap(NewPath); in replace_path_prefix()
548 void native(SmallVectorImpl<char> &Path, Style style) { in native() argument
549 if (Path.empty()) in native()
552 std::replace(Path.begin(), Path.end(), '/', '\\'); in native()
553 if (Path[0] == '~' && (Path.size() == 1 || is_separator(Path[1], style))) { in native()
556 PathHome.append(Path.begin() + 1, Path.end()); in native()
557 Path = PathHome; in native()
560 for (auto PI = Path.begin(), PE = Path.end(); PI < PE; ++PI) in native()
702 StringRef remove_leading_dotslash(StringRef Path, Style style) { in remove_leading_dotslash() argument
704 while (Path.size() > 2 && Path[0] == '.' && is_separator(Path[1], style)) { in remove_leading_dotslash()
705 Path = Path.substr(2); in remove_leading_dotslash()
706 while (Path.size() > 0 && is_separator(Path[0], style)) in remove_leading_dotslash()
707 Path = Path.substr(1); in remove_leading_dotslash()
709 return Path; in remove_leading_dotslash()
782 std::error_code getUniqueID(const Twine Path, UniqueID &Result) { in getUniqueID() argument
784 std::error_code EC = status(Path, Status); in getUniqueID()
963 std::error_code create_directories(const Twine &Path, bool IgnoreExisting, in create_directories() argument
966 StringRef P = Path.toStringRef(PathStorage); in create_directories()
1063 ErrorOr<MD5::MD5Result> md5_contents(const Twine &Path) { in md5_contents() argument
1065 if (auto EC = openFileForRead(Path, FD, OF_None)) in md5_contents()
1081 file_type get_file_type(const Twine &Path, bool Follow) { in get_file_type() argument
1083 if (status(Path, st, Follow)) in get_file_type()
1130 std::error_code is_other(const Twine &Path, bool &Result) { in is_other() argument
1132 if (std::error_code EC = status(Path, FileStatus)) in is_other()
1140 SmallString<128> PathStr = path::parent_path(Path); in replace_filename()
1142 this->Path = std::string(PathStr.str()); in replace_filename()
1147 ErrorOr<perms> getPermissions(const Twine &Path) { in getPermissions() argument
1149 if (std::error_code EC = status(Path, Status)) in getPermissions()