Home | History | Annotate | Download | only in files

Lines Matching refs:FilePath

34 typedef FilePath::StringType StringType;
41 const FilePath::CharType kStringTerminator = FILE_PATH_LITERAL('\0');
43 // If this FilePath contains a drive letter specification, returns the
87 FilePath::IsSeparator(path[letter + 1]);
91 FilePath::IsSeparator(path[0]) && FilePath::IsSeparator(path[1]);
94 return path.length() > 0 && FilePath::IsSeparator(path[0]);
101 if (!FilePath::IsSeparator(*it))
113 if (path == FilePath::kCurrentDirectory || path == FilePath::kParentDirectory)
116 return path.rfind(FilePath::kExtensionSeparator);
131 path.rfind(FilePath::kExtensionSeparator, last_dot - 1);
133 path.find_last_of(FilePath::kSeparators, last_dot - 1,
134 FilePath::kSeparatorsLength - 1);
164 if (path.empty() || path == FilePath::kCurrentDirectory ||
165 path == FilePath::kParentDirectory) {
174 FilePath::FilePath() {
177 FilePath::FilePath(const FilePath& that) : path_(that.path_) {
180 FilePath::FilePath(const StringType& path) : path_(path) {
186 FilePath::~FilePath() {
189 FilePath& FilePath::operator=(const FilePath& that) {
194 bool FilePath::operator==(const FilePath& that) const {
202 bool FilePath::operator!=(const FilePath& that) const {
211 bool FilePath::IsSeparator(CharType character) {
221 void FilePath::GetComponents(std::vector<StringType>* components) const {
230 FilePath current = *this;
231 FilePath base;
247 FilePath dir = current.DirName();
256 bool FilePath::IsParent(const FilePath& child) const {
260 bool FilePath::AppendRelativePath(const FilePath& child,
261 FilePath* path) const {
308 FilePath FilePath::DirName() const {
309 FilePath new_path(path_);
344 FilePath FilePath::BaseName() const {
345 FilePath new_path(path_);
367 StringType FilePath::Extension() const {
368 FilePath base(BaseName());
376 StringType FilePath::FinalExtension() const {
377 FilePath base(BaseName());
385 FilePath FilePath::RemoveExtension() const {
393 return FilePath(path_.substr(0, dot));
396 FilePath FilePath::RemoveFinalExtension() const {
404 return FilePath(path_.substr(0, dot));
407 FilePath FilePath::InsertBeforeExtension(const StringType& suffix) const {
409 return FilePath(path_);
412 return FilePath();
418 return FilePath(ret);
421 FilePath FilePath::InsertBeforeExtensionASCII(const StringPiece& suffix)
431 FilePath FilePath::AddExtension(const StringType& extension) const {
433 return FilePath();
435 // If the new extension is "" or ".", then just return the current FilePath.
445 return FilePath(str);
448 FilePath FilePath::ReplaceExtension(const StringType& extension) const {
450 return FilePath();
452 FilePath no_ext = RemoveExtension();
461 return FilePath(str);
464 bool FilePath::MatchesExtension(const StringType& extension) const {
472 return FilePath::CompareEqualIgnoreCase(extension, current_extension);
475 FilePath FilePath::Append(const StringType& component) const {
492 // it's likely in practice to wind up with FilePath objects containing
495 return FilePath(*appended);
498 FilePath new_path(path_);
519 FilePath FilePath::Append(const FilePath& component) const {
523 FilePath FilePath::AppendASCII(const StringPiece& component) const {
532 bool FilePath::IsAbsolute() const {
536 bool FilePath::EndsWithSeparator() const {
542 FilePath FilePath::AsEndingWithSeparator() const {
551 return FilePath(path_str);
554 FilePath FilePath::StripTrailingSeparators() const {
555 FilePath new_path(path_);
561 bool FilePath::ReferencesParent() const {
585 string16 FilePath::LossyDisplayName() const {
589 std::string FilePath::MaybeAsASCII() const {
595 std::string FilePath::AsUTF8Unsafe() const {
603 string16 FilePath::AsUTF16Unsafe() const {
612 FilePath FilePath::FromUTF8Unsafe(const std::string& utf8) {
614 return FilePath(utf8);
616 return FilePath(SysWideToNativeMB(UTF8ToWide(utf8)));
621 FilePath FilePath::FromUTF16Unsafe(const string16& utf16) {
623 return FilePath(UTF16ToUTF8(utf16));
625 return FilePath(SysWideToNativeMB(UTF16ToWide(utf16)));
630 string16 FilePath::LossyDisplayName() const {
634 std::string FilePath::MaybeAsASCII() const {
640 std::string FilePath::AsUTF8Unsafe() const {
644 string16 FilePath::AsUTF16Unsafe() const {
649 FilePath FilePath::FromUTF8Unsafe(const std::string& utf8) {
650 return FilePath(UTF8ToWide(utf8));
654 FilePath FilePath::FromUTF16Unsafe(const string16& utf16) {
655 return FilePath(utf16);
659 void FilePath::WriteToPickle(Pickle* pickle) const {
667 bool FilePath::ReadFromPickle(PickleIterator* iter) {
685 int FilePath::CompareIgnoreCase(const StringType& string1,
1159 int FilePath::HFSFastUnicodeCompare(const StringType& string1,
1183 StringType FilePath::GetHFSDecomposedForm(const StringType& string) {
1216 int FilePath::CompareIgnoreCase(const StringType& string1,
1259 int FilePath::CompareIgnoreCase(const StringType& string1,
1272 void FilePath::StripTrailingSeparatorsInternal() {
1294 FilePath FilePath::NormalizePathSeparators() const {
1298 FilePath FilePath::NormalizePathSeparatorsTo(CharType separator) const {
1306 return FilePath(copy);
1313 bool FilePath::IsContentUri() const {
1320 void PrintTo(const base::FilePath& path, std::ostream* out) {