Home | History | Annotate | Download | only in files

Lines Matching full:filepath

32 using StringType = FilePath::StringType;
33 using StringPieceType = FilePath::StringPieceType;
40 const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0');
42 // If this FilePath contains a drive letter specification, returns the
85 FilePath::IsSeparator(path[letter + 1]);
89 FilePath::IsSeparator(path[0]) && FilePath::IsSeparator(path[1]);
92 return path.length() > 0 && FilePath::IsSeparator(path[0]);
99 if (!FilePath::IsSeparator(*it))
111 if (path == FilePath::kCurrentDirectory || path == FilePath::kParentDirectory)
114 return path.rfind(FilePath::kExtensionSeparator);
129 path.rfind(FilePath::kExtensionSeparator, last_dot - 1);
131 path.find_last_of(FilePath::kSeparators, last_dot - 1,
132 FilePath::kSeparatorsLength - 1);
162 if (path.empty() || path == FilePath::kCurrentDirectory ||
163 path == FilePath::kParentDirectory) {
172 FilePath::FilePath() {
175 FilePath::FilePath(const FilePath& that) : path_(that.path_) {
178 FilePath::FilePath(StringPieceType path) {
185 FilePath::~FilePath() {
188 FilePath& FilePath::operator=(const FilePath& that) {
193 bool FilePath::operator==(const FilePath& that) const {
201 bool FilePath::operator!=(const FilePath& that) const {
210 bool FilePath::IsSeparator(CharType character) {
220 void FilePath::GetComponents(std::vector<StringType>* components) const {
229 FilePath current = *this;
230 FilePath base;
246 FilePath dir = current.DirName();
255 bool FilePath::IsParent(const FilePath& child) const {
259 bool FilePath::AppendRelativePath(const FilePath& child,
260 FilePath* path) const {
307 FilePath FilePath::DirName() const {
308 FilePath new_path(path_);
343 FilePath FilePath::BaseName() const {
344 FilePath new_path(path_);
366 StringType FilePath::Extension() const {
367 FilePath base(BaseName());
375 StringType FilePath::FinalExtension() const {
376 FilePath base(BaseName());
384 FilePath FilePath::RemoveExtension() const {
392 return FilePath(path_.substr(0, dot));
395 FilePath FilePath::RemoveFinalExtension() const {
403 return FilePath(path_.substr(0, dot));
406 FilePath FilePath::InsertBeforeExtension(StringPieceType suffix) const {
408 return FilePath(path_);
411 return FilePath();
417 return FilePath(ret);
420 FilePath FilePath::InsertBeforeExtensionASCII(StringPiece suffix)
430 FilePath FilePath::AddExtension(StringPieceType extension) const {
432 return FilePath();
434 // If the new extension is "" or ".", then just return the current FilePath.
445 return FilePath(str);
448 FilePath FilePath::ReplaceExtension(StringPieceType extension) const {
450 return FilePath();
452 FilePath no_ext = RemoveExtension();
462 return FilePath(str);
465 bool FilePath::MatchesExtension(StringPieceType extension) const {
473 return FilePath::CompareEqualIgnoreCase(extension, current_extension);
476 FilePath FilePath::Append(StringPieceType component) const {
493 // it's likely in practice to wind up with FilePath objects containing
496 return FilePath(appended);
499 FilePath new_path(path_);
520 FilePath FilePath::Append(const FilePath& component) const {
524 FilePath FilePath::AppendASCII(StringPiece component) const {
533 bool FilePath::IsAbsolute() const {
537 bool FilePath::EndsWithSeparator() const {
543 FilePath FilePath::AsEndingWithSeparator() const {
552 return FilePath(path_str);
555 FilePath FilePath::StripTrailingSeparators() const {
556 FilePath new_path(path_);
562 bool FilePath::ReferencesParent() const {
586 string16 FilePath::LossyDisplayName() const {
590 std::string FilePath::MaybeAsASCII() const {
596 std::string FilePath::AsUTF8Unsafe() const {
604 string16 FilePath::AsUTF16Unsafe() const {
613 FilePath FilePath::FromUTF8Unsafe(const std::string& utf8) {
615 return FilePath(utf8);
617 return FilePath(SysWideToNativeMB(UTF8ToWide(utf8)));
622 FilePath FilePath::FromUTF16Unsafe(const string16& utf16) {
624 return FilePath(UTF16ToUTF8(utf16));
626 return FilePath(SysWideToNativeMB(UTF16ToWide(utf16)));
631 string16 FilePath::LossyDisplayName() const {
635 std::string FilePath::MaybeAsASCII() const {
641 std::string FilePath::AsUTF8Unsafe() const {
645 string16 FilePath::AsUTF16Unsafe() const {
650 FilePath FilePath::FromUTF8Unsafe(const std::string& utf8) {
651 return FilePath(UTF8ToWide(utf8));
655 FilePath FilePath::FromUTF16Unsafe(const string16& utf16) {
656 return FilePath(utf16);
660 void FilePath::WriteToPickle(Pickle* pickle) const {
668 bool FilePath::ReadFromPickle(PickleIterator* iter) {
686 int FilePath::CompareIgnoreCase(StringPieceType string1,
1162 int FilePath::HFSFastUnicodeCompare(StringPieceType string1,
1186 StringType FilePath::GetHFSDecomposedForm(StringPieceType string) {
1219 int FilePath::CompareIgnoreCase(StringPieceType string1,
1261 int FilePath::CompareIgnoreCase(StringPieceType string1,
1276 void FilePath::StripTrailingSeparatorsInternal() {
1298 FilePath FilePath::NormalizePathSeparators() const {
1302 FilePath FilePath::NormalizePathSeparatorsTo(CharType /* separator */) const {
1310 return FilePath(copy);
1317 bool FilePath::IsContentUri() const {