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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 #endif // OS_WIN | 143 #endif // OS_WIN |
144 | 144 |
145 typedef StringType::value_type CharType; | 145 typedef StringType::value_type CharType; |
146 | 146 |
147 // Null-terminated array of separators used to separate components in | 147 // Null-terminated array of separators used to separate components in |
148 // hierarchical paths. Each character in this array is a valid separator, | 148 // hierarchical paths. Each character in this array is a valid separator, |
149 // but kSeparators[0] is treated as the canonical separator and will be used | 149 // but kSeparators[0] is treated as the canonical separator and will be used |
150 // when composing pathnames. | 150 // when composing pathnames. |
151 static const CharType kSeparators[]; | 151 static const CharType kSeparators[]; |
152 | 152 |
| 153 // arraysize(kSeparators). |
| 154 static const size_t kSeparatorsLength; |
| 155 |
153 // A special path component meaning "this directory." | 156 // A special path component meaning "this directory." |
154 static const CharType kCurrentDirectory[]; | 157 static const CharType kCurrentDirectory[]; |
155 | 158 |
156 // A special path component meaning "the parent directory." | 159 // A special path component meaning "the parent directory." |
157 static const CharType kParentDirectory[]; | 160 static const CharType kParentDirectory[]; |
158 | 161 |
159 // The character used to identify a file extension. | 162 // The character used to identify a file extension. |
160 static const CharType kExtensionSeparator; | 163 static const CharType kExtensionSeparator; |
161 | 164 |
162 FilePath(); | 165 FilePath(); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 443 |
441 inline size_t hash_value(const base::FilePath& f) { | 444 inline size_t hash_value(const base::FilePath& f) { |
442 return hash_value(f.value()); | 445 return hash_value(f.value()); |
443 } | 446 } |
444 | 447 |
445 #endif // COMPILER | 448 #endif // COMPILER |
446 | 449 |
447 } // namespace BASE_HASH_NAMESPACE | 450 } // namespace BASE_HASH_NAMESPACE |
448 | 451 |
449 #endif // BASE_FILES_FILE_PATH_H_ | 452 #endif // BASE_FILES_FILE_PATH_H_ |
OLD | NEW |