Chromium Code Reviews| Index: base/files/file_path.h |
| diff --git a/base/files/file_path.h b/base/files/file_path.h |
| index feb5f896687fa3e01bff31f006ef179b6919d799..54e0464ad57d61a4e5870fd817888f5a4ff76243 100644 |
| --- a/base/files/file_path.h |
| +++ b/base/files/file_path.h |
| @@ -147,6 +147,12 @@ class FilePath { |
| // A special path component meaning "this directory." |
| static const CharType kCurrentDirectory[]; |
| + // A special path component meaning "the parent directory." |
| + static const CharType kParentDirectory[]; |
| + |
| + // The character used to identify a file extension. |
| + static const CharType kExtensionSeparator; |
| + |
| FilePath(); |
| FilePath(const FilePath& that); |
| explicit FilePath(const StringType& path); |
| @@ -184,6 +190,14 @@ class FilePath { |
| // this is the only situation in which BaseName will return an absolute path. |
| FilePath BaseName() const WARN_UNUSED_RESULT; |
| + // Returns the path's file extension. This does not have a special case for |
| + // common double extensions, so FinalExtension() of "foo.tar.gz" is simply |
| + // "foo.tar". |
|
Mark Mentovai
2015/01/20 17:11:53
I think this comment means “.gz”, not “foo.tar”. R
scottmg
2015/01/20 18:01:27
Done.
|
| + StringType FinalExtension() const; |
|
Mark Mentovai
2015/01/20 17:11:53
Even though upstream’s not WARN_UNUSED_RESULT, it
scottmg
2015/01/20 18:01:27
I think generally only the FilePath returning ones
|
| + |
| + // Returns a FilePath with FinalExtension() removed. |
| + FilePath RemoveFinalExtension() const WARN_UNUSED_RESULT; |
| + |
| // Returns a FilePath by appending a separator and the supplied path |
| // component to this object's path. Append takes care to avoid adding |
| // excessive separators if this object's path already ends with a separator. |