Index: base/files/file_path.h |
diff --git a/base/files/file_path.h b/base/files/file_path.h |
index f4b8ff8ade83b13da43a3ad0e071fce88a40edb3..734c4026afc34e5d4bf27fceb07971a2a3bafca2 100644 |
--- a/base/files/file_path.h |
+++ b/base/files/file_path.h |
@@ -189,6 +189,13 @@ class BASE_EXPORT FilePath { |
// Returns a vector of all of the components of the provided path. It is |
// equivalent to calling DirName().value() on the path's root component, |
// and BaseName().value() on each child component. |
+ // |
+ // To make sure this is lossless so we can differentiate absolute and |
+ // relative paths, the root slash will be included even though no other |
+ // slashes will be. The precise behavior is: |
+ // |
+ // Posix: "/foo/bar" -> [ "/", "foo", "bar" ] |
+ // Windows: "C:\foo\bar" -> [ "C:", "\\", "foo", "bar" ] |
void GetComponents(std::vector<FilePath::StringType>* components) const; |
// Returns true if this FilePath is a strict parent of the |child|. Absolute |