Lines Matching refs:Path
230 i.Path = path; in begin()
239 i.Path = path; in end()
245 assert(Position < Path.size() && "Tried to increment past end!"); in operator ++()
251 if (Position == Path.size()) { in operator ++()
262 if (is_separator(Path[Position], S)) { in operator ++()
267 Component = Path.substr(Position, 1); in operator ++()
272 while (Position != Path.size() && is_separator(Path[Position], S)) { in operator ++()
277 if (Position == Path.size() && Component != "/") { in operator ++()
285 size_t end_pos = Path.find_first_of(separators(S), Position); in operator ++()
286 Component = Path.slice(Position, end_pos); in operator ++()
292 return Path.begin() == RHS.Path.begin() && Position == RHS.Position; in operator ==()
299 reverse_iterator rbegin(StringRef Path, Style style) { in rbegin() argument
301 I.Path = Path; in rbegin()
302 I.Position = Path.size(); in rbegin()
308 reverse_iterator rend(StringRef Path) { in rend() argument
310 I.Path = Path; in rend()
311 I.Component = Path.substr(0, 0); in rend()
317 size_t root_dir_pos = root_dir_start(Path, S); in operator ++()
322 is_separator(Path[end_pos - 1], S)) in operator ++()
326 if (Position == Path.size() && !Path.empty() && in operator ++()
327 is_separator(Path.back(), S) && in operator ++()
335 size_t start_pos = filename_pos(Path.substr(0, end_pos), S); in operator ++()
336 Component = Path.slice(start_pos, end_pos); in operator ++()
342 return Path.begin() == RHS.Path.begin() && Component == RHS.Component && in operator ==()
501 static bool starts_with(StringRef Path, StringRef Prefix, in starts_with() argument
505 if (Path.size() < Prefix.size()) in starts_with()
508 bool SepPath = is_separator(Path[I], style); in starts_with()
512 if (!SepPath && toLower(Path[I]) != toLower(Prefix[I])) in starts_with()
517 return Path.starts_with(Prefix); in starts_with()
520 bool replace_path_prefix(SmallVectorImpl<char> &Path, StringRef OldPrefix, in replace_path_prefix() argument
525 StringRef OrigPath(Path.begin(), Path.size()); in replace_path_prefix()
531 llvm::copy(NewPrefix, Path.begin()); in replace_path_prefix()
538 Path.swap(NewPath); in replace_path_prefix()
552 void native(SmallVectorImpl<char> &Path, Style style) { in native() argument
553 if (Path.empty()) in native()
556 for (char &Ch : Path) in native()
559 if (Path[0] == '~' && (Path.size() == 1 || is_separator(Path[1], style))) { in native()
562 PathHome.append(Path.begin() + 1, Path.end()); in native()
563 Path = PathHome; in native()
566 std::replace(Path.begin(), Path.end(), '\\', '/'); in native()
705 StringRef remove_leading_dotslash(StringRef Path, Style style) { in remove_leading_dotslash() argument
707 while (Path.size() > 2 && Path[0] == '.' && is_separator(Path[1], style)) { in remove_leading_dotslash()
708 Path = Path.substr(2); in remove_leading_dotslash()
709 while (Path.size() > 0 && is_separator(Path[0], style)) in remove_leading_dotslash()
710 Path = Path.substr(1); in remove_leading_dotslash()
712 return Path; in remove_leading_dotslash()
789 std::error_code getUniqueID(const Twine Path, UniqueID &Result) { in getUniqueID() argument
791 std::error_code EC = status(Path, Status); in getUniqueID()
969 std::error_code create_directories(const Twine &Path, bool IgnoreExisting, in create_directories() argument
972 StringRef P = Path.toStringRef(PathStorage); in create_directories()
1069 ErrorOr<MD5::MD5Result> md5_contents(const Twine &Path) { in md5_contents() argument
1071 if (auto EC = openFileForRead(Path, FD, OF_None)) in md5_contents()
1087 file_type get_file_type(const Twine &Path, bool Follow) { in get_file_type() argument
1089 if (status(Path, st, Follow)) in get_file_type()
1136 std::error_code is_other(const Twine &Path, bool &Result) { in is_other() argument
1138 if (std::error_code EC = status(Path, FileStatus)) in is_other()
1146 SmallString<128> PathStr = path::parent_path(Path); in replace_filename()
1148 this->Path = std::string(PathStr); in replace_filename()
1153 ErrorOr<perms> getPermissions(const Twine &Path) { in getPermissions() argument
1155 if (std::error_code EC = status(Path, Status)) in getPermissions()