Lines Matching refs:FilePath
31 using StringType = FilePath::StringType;
32 using StringViewType = FilePath::StringViewType;
39 const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0');
84 FilePath::IsSeparator(path[letter + 1]); in IsPathAbsolute()
87 return path.length() > 1 && FilePath::IsSeparator(path[0]) && in IsPathAbsolute()
88 FilePath::IsSeparator(path[1]); in IsPathAbsolute()
91 return path.length() > 0 && FilePath::IsSeparator(path[0]); in IsPathAbsolute()
97 if (!FilePath::IsSeparator(*it)) in AreAllSeparators()
109 if (path == FilePath::kCurrentDirectory || path == FilePath::kParentDirectory) in FinalExtensionSeparatorPosition()
112 return path.rfind(FilePath::kExtensionSeparator); in FinalExtensionSeparatorPosition()
127 path.rfind(FilePath::kExtensionSeparator, last_dot - 1); in ExtensionSeparatorPosition()
129 FilePath::kSeparators, last_dot - 1, FilePath::kSeparatorsLength - 1); in ExtensionSeparatorPosition()
159 if (path.empty() || path == FilePath::kCurrentDirectory || in IsEmptyOrSpecialCase()
160 path == FilePath::kParentDirectory) { in IsEmptyOrSpecialCase()
169 FilePath::FilePath() = default;
171 FilePath::FilePath(const FilePath& that) = default;
172 FilePath::FilePath(FilePath&& that) noexcept = default;
174 FilePath::FilePath(StringViewType path) { in FilePath() function in base::FilePath
181 FilePath::~FilePath() = default;
183 FilePath& FilePath::operator=(const FilePath& that) = default;
185 FilePath& FilePath::operator=(FilePath&& that) = default;
187 bool FilePath::operator==(const FilePath& that) const { in operator ==()
195 bool FilePath::operator!=(const FilePath& that) const { in operator !=()
204 bool FilePath::IsSeparator(CharType character) { in IsSeparator()
214 void FilePath::GetComponents(std::vector<StringType>* components) const { in GetComponents()
223 FilePath current = *this; in GetComponents()
224 FilePath base; in GetComponents()
240 FilePath dir = current.DirName(); in GetComponents()
249 bool FilePath::IsParent(const FilePath& child) const { in IsParent()
253 bool FilePath::AppendRelativePath(const FilePath& child, FilePath* path) const { in AppendRelativePath()
299 FilePath FilePath::DirName() const { in DirName()
300 FilePath new_path(path_); in DirName()
334 FilePath FilePath::BaseName() const { in BaseName()
335 FilePath new_path(path_); in BaseName()
356 StringType FilePath::Extension() const { in Extension()
357 FilePath base(BaseName()); in Extension()
365 StringType FilePath::FinalExtension() const { in FinalExtension()
366 FilePath base(BaseName()); in FinalExtension()
374 FilePath FilePath::RemoveExtension() const { in RemoveExtension()
382 return FilePath(path_.substr(0, dot)); in RemoveExtension()
385 FilePath FilePath::RemoveFinalExtension() const { in RemoveFinalExtension()
393 return FilePath(path_.substr(0, dot)); in RemoveFinalExtension()
396 FilePath FilePath::InsertBeforeExtension(StringViewType suffix) const { in InsertBeforeExtension()
398 return FilePath(path_); in InsertBeforeExtension()
401 return FilePath(); in InsertBeforeExtension()
407 return FilePath(ret); in InsertBeforeExtension()
410 FilePath FilePath::InsertBeforeExtensionASCII(std::string_view suffix) const { in InsertBeforeExtensionASCII()
419 FilePath FilePath::AddExtension(StringViewType extension) const { in AddExtension()
421 return FilePath(); in AddExtension()
434 return FilePath(str); in AddExtension()
437 FilePath FilePath::ReplaceExtension(StringViewType extension) const { in ReplaceExtension()
439 return FilePath(); in ReplaceExtension()
441 FilePath no_ext = RemoveExtension(); in ReplaceExtension()
451 return FilePath(str); in ReplaceExtension()
454 FilePath FilePath::Append(StringViewType component) const { in Append()
474 return FilePath(appended); in Append()
477 FilePath new_path(path_); in Append()
498 FilePath FilePath::Append(const FilePath& component) const { in Append()
502 FilePath FilePath::AppendASCII(std::string_view component) const { in AppendASCII()
511 bool FilePath::IsAbsolute() const { in IsAbsolute()
515 bool FilePath::EndsWithSeparator() const { in EndsWithSeparator()
521 FilePath FilePath::AsEndingWithSeparator() const { in AsEndingWithSeparator()
530 return FilePath(path_str); in AsEndingWithSeparator()
533 FilePath FilePath::StripTrailingSeparators() const { in StripTrailingSeparators()
534 FilePath new_path(path_); in StripTrailingSeparators()
540 bool FilePath::ReferencesParent() const { in ReferencesParent()
568 std::u16string FilePath::LossyDisplayName() const { in LossyDisplayName()
572 std::string FilePath::MaybeAsASCII() const { in MaybeAsASCII()
578 std::string FilePath::As8Bit() const { in As8Bit()
587 std::string FilePath::MaybeAsASCII() const { in MaybeAsASCII()
593 std::string FilePath::As8Bit() const { in As8Bit()
599 void FilePath::StripTrailingSeparatorsInternal() { in StripTrailingSeparatorsInternal()
620 FilePath FilePath::NormalizePathSeparators() const { in NormalizePathSeparators()
624 FilePath FilePath::NormalizePathSeparatorsTo(CharType separator) const { in NormalizePathSeparatorsTo()
632 return FilePath(copy); in NormalizePathSeparatorsTo()