Index: base/file_path.h |
diff --git a/base/file_path.h b/base/file_path.h |
index 4d763eb394c1cca1eb11225a753a185f05e0c947..eb7279846a347413f858e9522cebd86a3f80b12c 100644 |
--- a/base/file_path.h |
+++ b/base/file_path.h |
@@ -242,13 +242,21 @@ class BASE_EXPORT FilePath { |
FilePath InsertBeforeExtensionASCII( |
const base::StringPiece& suffix) const WARN_UNUSED_RESULT; |
+ // Adds |extension| to |file_name|. Returns the current FilePath if |
+ // |extension| is empty. Returns "" if BaseName() == "." or "..". |
+ FilePath AddExtension( |
Mark Mentovai
2012/04/16 15:54:45
It’s hard to see why you need to use this without
Devlin
2012/04/17 21:52:49
The most common instance I've encountered is when
|
+ const StringType& extension) const WARN_UNUSED_RESULT; |
+ |
// Replaces the extension of |file_name| with |extension|. If |file_name| |
- // does not have an extension, them |extension| is added. If |extension| is |
+ // does not have an extension, then |extension| is added. If |extension| is |
// empty, then the extension is removed from |file_name|. |
// Returns "" if BaseName() == "." or "..". |
FilePath ReplaceExtension( |
const StringType& extension) const WARN_UNUSED_RESULT; |
+ // Returns true if BaseName() is "", ".", or "..". |
+ bool IsBaseEmptyOrSpecialCase() const; |
Mark Mentovai
2012/04/16 15:54:45
Why do you need to expose this?
Devlin
2012/04/17 21:52:49
My original thought was that these instances are f
Mark Mentovai
2012/04/18 20:02:21
D Cronin wrote:
Devlin
2012/04/19 00:05:42
Done.
|
+ |
// Returns true if the file path matches the specified extension. The test is |
// case insensitive. Don't forget the leading period if appropriate. |
bool MatchesExtension(const StringType& extension) const; |