OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // FilePath is a container for pathnames stored in a platform's native string | 5 // FilePath is a container for pathnames stored in a platform's native string |
6 // type, providing containers for manipulation in according with the | 6 // type, providing containers for manipulation in according with the |
7 // platform's conventions for pathnames. It supports the following path | 7 // platform's conventions for pathnames. It supports the following path |
8 // types: | 8 // types: |
9 // | 9 // |
10 // POSIX Windows | 10 // POSIX Windows |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 static const CharType kCurrentDirectory[]; | 171 static const CharType kCurrentDirectory[]; |
172 | 172 |
173 // A special path component meaning "the parent directory." | 173 // A special path component meaning "the parent directory." |
174 static const CharType kParentDirectory[]; | 174 static const CharType kParentDirectory[]; |
175 | 175 |
176 // The character used to identify a file extension. | 176 // The character used to identify a file extension. |
177 static const CharType kExtensionSeparator; | 177 static const CharType kExtensionSeparator; |
178 | 178 |
179 FilePath(); | 179 FilePath(); |
180 FilePath(const FilePath& that); | 180 FilePath(const FilePath& that); |
181 FilePath(FilePath&& that); | |
danakj
2017/01/11 16:08:36
Can you drop a comment that |that| is left in an v
dmurph
2017/01/11 20:07:55
Done.
| |
181 explicit FilePath(StringPieceType path); | 182 explicit FilePath(StringPieceType path); |
182 ~FilePath(); | 183 ~FilePath(); |
183 FilePath& operator=(const FilePath& that); | 184 FilePath& operator=(const FilePath& that); |
185 FilePath& operator=(FilePath&& that); | |
danakj
2017/01/11 16:08:36
same
dmurph
2017/01/11 20:07:55
Done.
| |
184 | 186 |
185 bool operator==(const FilePath& that) const; | 187 bool operator==(const FilePath& that) const; |
186 | 188 |
187 bool operator!=(const FilePath& that) const; | 189 bool operator!=(const FilePath& that) const; |
188 | 190 |
189 // Required for some STL containers and operations | 191 // Required for some STL containers and operations |
190 bool operator<(const FilePath& that) const { | 192 bool operator<(const FilePath& that) const { |
191 return path_ < that.path_; | 193 return path_ < that.path_; |
192 } | 194 } |
193 | 195 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
470 template<> | 472 template<> |
471 struct hash<base::FilePath> { | 473 struct hash<base::FilePath> { |
472 size_t operator()(const base::FilePath& f) const { | 474 size_t operator()(const base::FilePath& f) const { |
473 return hash<base::FilePath::StringType>()(f.value()); | 475 return hash<base::FilePath::StringType>()(f.value()); |
474 } | 476 } |
475 }; | 477 }; |
476 | 478 |
477 } // namespace BASE_HASH_NAMESPACE | 479 } // namespace BASE_HASH_NAMESPACE |
478 | 480 |
479 #endif // BASE_FILES_FILE_PATH_H_ | 481 #endif // BASE_FILES_FILE_PATH_H_ |
OLD | NEW |