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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 explicit FilePath(StringPieceType path); | 181 explicit FilePath(StringPieceType path); |
182 ~FilePath(); | 182 ~FilePath(); |
183 FilePath& operator=(const FilePath& that); | 183 FilePath& operator=(const FilePath& that); |
184 | 184 |
| 185 // Constructs FilePath with the contents of |that|, which is left in valid but |
| 186 // unspecified state. |
| 187 FilePath(FilePath&& that); |
| 188 // Replaces the contents with those of |that|, which is left in valid but |
| 189 // unspecified state. |
| 190 FilePath& operator=(FilePath&& that); |
| 191 |
185 bool operator==(const FilePath& that) const; | 192 bool operator==(const FilePath& that) const; |
186 | 193 |
187 bool operator!=(const FilePath& that) const; | 194 bool operator!=(const FilePath& that) const; |
188 | 195 |
189 // Required for some STL containers and operations | 196 // Required for some STL containers and operations |
190 bool operator<(const FilePath& that) const { | 197 bool operator<(const FilePath& that) const { |
191 return path_ < that.path_; | 198 return path_ < that.path_; |
192 } | 199 } |
193 | 200 |
194 const StringType& value() const { return path_; } | 201 const StringType& value() const { return path_; } |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 template<> | 477 template<> |
471 struct hash<base::FilePath> { | 478 struct hash<base::FilePath> { |
472 size_t operator()(const base::FilePath& f) const { | 479 size_t operator()(const base::FilePath& f) const { |
473 return hash<base::FilePath::StringType>()(f.value()); | 480 return hash<base::FilePath::StringType>()(f.value()); |
474 } | 481 } |
475 }; | 482 }; |
476 | 483 |
477 } // namespace BASE_HASH_NAMESPACE | 484 } // namespace BASE_HASH_NAMESPACE |
478 | 485 |
479 #endif // BASE_FILES_FILE_PATH_H_ | 486 #endif // BASE_FILES_FILE_PATH_H_ |
OLD | NEW |