Lines Matching defs: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))
117 if (path == FilePath::kCurrentDirectory || path == FilePath::kParentDirectory)
121 path.rfind(FilePath::kExtensionSeparator);
128 path.rfind(FilePath::kExtensionSeparator, last_dot - 1);
130 path.find_last_of(FilePath::kSeparators, last_dot - 1,
131 FilePath::kSeparatorsLength - 1);
161 if (path.empty() || path == FilePath::kCurrentDirectory ||
162 path == FilePath::kParentDirectory) {
171 FilePath::FilePath() {
174 FilePath::FilePath(const FilePath& that) : path_(that.path_) {
177 FilePath::FilePath(const StringType& path) : path_(path) {
183 FilePath::~FilePath() {
186 FilePath& FilePath::operator=(const FilePath& that) {
191 bool FilePath::operator==(const FilePath& that) const {
199 bool FilePath::operator!=(const FilePath& that) const {
208 bool FilePath::IsSeparator(CharType character) {
218 void FilePath::GetComponents(std::vector<StringType>* components) const {
227 FilePath current = *this;
228 FilePath base;
244 FilePath dir = current.DirName();
253 bool FilePath::IsParent(const FilePath& child) const {
257 bool FilePath::AppendRelativePath(const FilePath& child,
258 FilePath* path) const {
305 FilePath FilePath::DirName() const {
306 FilePath new_path(path_);
341 FilePath FilePath::BaseName() const {
342 FilePath new_path(path_);
364 StringType FilePath::Extension() const {
365 FilePath base(BaseName());
373 FilePath FilePath::RemoveExtension() const {
381 return FilePath(path_.substr(0, dot));
384 FilePath FilePath::InsertBeforeExtension(const StringType& suffix) const {
386 return FilePath(path_);
389 return FilePath();
395 return FilePath(ret);
398 FilePath FilePath::InsertBeforeExtensionASCII(const StringPiece& suffix)
408 FilePath FilePath::AddExtension(const StringType& extension) const {
410 return FilePath();
412 // If the new extension is "" or ".", then just return the current FilePath.
422 return FilePath(str);
425 FilePath FilePath::ReplaceExtension(const StringType& extension) const {
427 return FilePath();
429 FilePath no_ext = RemoveExtension();
438 return FilePath(str);
441 bool FilePath::MatchesExtension(const StringType& extension) const {
449 return FilePath::CompareEqualIgnoreCase(extension, current_extension);
452 FilePath FilePath::Append(const StringType& component) const {
469 // it's likely in practice to wind up with FilePath objects containing
472 return FilePath(*appended);
475 FilePath new_path(path_);
496 FilePath FilePath::Append(const FilePath& component) const {
500 FilePath FilePath::AppendASCII(const StringPiece& component) const {
509 bool FilePath::IsAbsolute() const {
513 bool FilePath::EndsWithSeparator() const {
519 FilePath FilePath::AsEndingWithSeparator() const {
528 return FilePath(path_str);
531 FilePath FilePath::StripTrailingSeparators() const {
532 FilePath new_path(path_);
538 bool FilePath::ReferencesParent() const {
562 string16 FilePath::LossyDisplayName() const {
566 std::string FilePath::MaybeAsASCII() const {
572 std::string FilePath::AsUTF8Unsafe() const {
580 string16 FilePath::AsUTF16Unsafe() const {
592 FilePath FilePath::FromWStringHack(const std::wstring& wstring) {
593 return FilePath(SysWideToNativeMB(wstring));
597 FilePath FilePath::FromUTF8Unsafe(const std::string& utf8) {
599 return FilePath(utf8);
601 return FilePath(SysWideToNativeMB(UTF8ToWide(utf8)));
606 FilePath FilePath::FromUTF16Unsafe(const string16& utf16) {
608 return FilePath(UTF16ToUTF8(utf16));
610 return FilePath(SysWideToNativeMB(UTF16ToWide(utf16)));
615 string16 FilePath::LossyDisplayName() const {
619 std::string FilePath::MaybeAsASCII() const {
625 std::string FilePath::AsUTF8Unsafe() const {
629 string16 FilePath::AsUTF16Unsafe() const {
634 FilePath FilePath::FromWStringHack(const std::wstring& wstring) {
635 return FilePath(wstring);
639 FilePath FilePath::FromUTF8Unsafe(const std::string& utf8) {
640 return FilePath(UTF8ToWide(utf8));
644 FilePath FilePath::FromUTF16Unsafe(const string16& utf16) {
645 return FilePath(utf16);
649 void FilePath::WriteToPickle(Pickle* pickle) const {
657 bool FilePath::ReadFromPickle(PickleIterator* iter) {
675 int FilePath::CompareIgnoreCase(const StringType& string1,
1149 int FilePath::HFSFastUnicodeCompare(const StringType& string1,
1173 StringType FilePath::GetHFSDecomposedForm(const StringType& string) {
1206 int FilePath::CompareIgnoreCase(const StringType& string1,
1249 int FilePath::CompareIgnoreCase(const StringType& string1,
1262 void FilePath::StripTrailingSeparatorsInternal() {
1284 FilePath FilePath::NormalizePathSeparators() const {
1290 return FilePath(copy);
1298 void PrintTo(const base::FilePath& path, std::ostream* out) {