Lines Matching refs:Path
229 i.Path = path; in begin()
238 i.Path = path; in end()
244 assert(Position < Path.size() && "Tried to increment past end!"); in operator ++()
250 if (Position == Path.size()) { in operator ++()
261 if (is_separator(Path[Position], S)) { in operator ++()
266 Component = Path.substr(Position, 1); in operator ++()
271 while (Position != Path.size() && is_separator(Path[Position], S)) { in operator ++()
276 if (Position == Path.size() && Component != "/") { in operator ++()
284 size_t end_pos = Path.find_first_of(separators(S), Position); in operator ++()
285 Component = Path.slice(Position, end_pos); in operator ++()
291 return Path.begin() == RHS.Path.begin() && Position == RHS.Position; in operator ==()
298 reverse_iterator rbegin(StringRef Path, Style style) { in rbegin() argument
300 I.Path = Path; in rbegin()
301 I.Position = Path.size(); in rbegin()
307 reverse_iterator rend(StringRef Path) { in rend() argument
309 I.Path = Path; in rend()
310 I.Component = Path.substr(0, 0); in rend()
316 size_t root_dir_pos = root_dir_start(Path, S); in operator ++()
321 is_separator(Path[end_pos - 1], S)) in operator ++()
325 if (Position == Path.size() && !Path.empty() && in operator ++()
326 is_separator(Path.back(), S) && in operator ++()
334 size_t start_pos = filename_pos(Path.substr(0, end_pos), S); in operator ++()
335 Component = Path.slice(start_pos, end_pos); in operator ++()
341 return Path.begin() == RHS.Path.begin() && Component == RHS.Component && in operator ==()
500 static bool starts_with(StringRef Path, StringRef Prefix, in starts_with() argument
504 if (Path.size() < Prefix.size()) in starts_with()
507 bool SepPath = is_separator(Path[I], style); in starts_with()
511 if (!SepPath && toLower(Path[I]) != toLower(Prefix[I])) in starts_with()
516 return Path.starts_with(Prefix); in starts_with()
519 bool replace_path_prefix(SmallVectorImpl<char> &Path, StringRef OldPrefix, in replace_path_prefix() argument
524 StringRef OrigPath(Path.begin(), Path.size()); in replace_path_prefix()
530 llvm::copy(NewPrefix, Path.begin()); in replace_path_prefix()
537 Path.swap(NewPath); in replace_path_prefix()
551 void native(SmallVectorImpl<char> &Path, Style style) { in native() argument
552 if (Path.empty()) in native()
555 for (char &Ch : Path) in native()
558 if (Path[0] == '~' && (Path.size() == 1 || is_separator(Path[1], style))) { in native()
561 PathHome.append(Path.begin() + 1, Path.end()); in native()
562 Path = PathHome; in native()
565 std::replace(Path.begin(), Path.end(), '\\', '/'); in native()
704 StringRef remove_leading_dotslash(StringRef Path, Style style) { in remove_leading_dotslash() argument
706 while (Path.size() > 2 && Path[0] == '.' && is_separator(Path[1], style)) { in remove_leading_dotslash()
707 Path = Path.substr(2); in remove_leading_dotslash()
708 while (Path.size() > 0 && is_separator(Path[0], style)) in remove_leading_dotslash()
709 Path = Path.substr(1); in remove_leading_dotslash()
711 return Path; in remove_leading_dotslash()
788 std::error_code getUniqueID(const Twine Path, UniqueID &Result) { in getUniqueID() argument
790 std::error_code EC = status(Path, Status); in getUniqueID()
968 std::error_code create_directories(const Twine &Path, bool IgnoreExisting, in create_directories() argument
971 StringRef P = Path.toStringRef(PathStorage); in create_directories()
1068 ErrorOr<MD5::MD5Result> md5_contents(const Twine &Path) { in md5_contents() argument
1070 if (auto EC = openFileForRead(Path, FD, OF_None)) in md5_contents()
1086 file_type get_file_type(const Twine &Path, bool Follow) { in get_file_type() argument
1088 if (status(Path, st, Follow)) in get_file_type()
1135 std::error_code is_other(const Twine &Path, bool &Result) { in is_other() argument
1137 if (std::error_code EC = status(Path, FileStatus)) in is_other()
1145 SmallString<128> PathStr = path::parent_path(Path); in replace_filename()
1147 this->Path = std::string(PathStr); in replace_filename()
1152 ErrorOr<perms> getPermissions(const Twine &Path) { in getPermissions() argument
1154 if (std::error_code EC = status(Path, Status)) in getPermissions()