OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // | 59 // |
60 // | const FilePath::CharType kLogFileName[] = FILE_PATH_LITERAL("log.txt"); | 60 // | const FilePath::CharType kLogFileName[] = FILE_PATH_LITERAL("log.txt"); |
61 // | | 61 // | |
62 // | void Function() { | 62 // | void Function() { |
63 // | FilePath log_file_path(kLogFileName); | 63 // | FilePath log_file_path(kLogFileName); |
64 // | [...] | 64 // | [...] |
65 // | } | 65 // | } |
66 // | 66 // |
67 // WARNING: FilePaths should ALWAYS be displayed with LTR directionality, even | 67 // WARNING: FilePaths should ALWAYS be displayed with LTR directionality, even |
68 // when the UI language is RTL. This means you always need to pass filepaths | 68 // when the UI language is RTL. This means you always need to pass filepaths |
69 // through l10n_util::WrapPathWithLTRFormatting() before displaying it in the | 69 // through base::i18n::WrapPathWithLTRFormatting() before displaying it in the |
70 // RTL UI. | 70 // RTL UI. |
71 // | 71 // |
72 // This is a very common source of bugs, please try to keep this in mind. | 72 // This is a very common source of bugs, please try to keep this in mind. |
73 // | 73 // |
74 // ARCANE BITS OF PATH TRIVIA | 74 // ARCANE BITS OF PATH TRIVIA |
75 // | 75 // |
76 // - A double leading slash is actually part of the POSIX standard. Systems | 76 // - A double leading slash is actually part of the POSIX standard. Systems |
77 // are allowed to treat // as an alternate root, as Windows does for UNC | 77 // are allowed to treat // as an alternate root, as Windows does for UNC |
78 // (network share) paths. Most POSIX systems don't do anything special | 78 // (network share) paths. Most POSIX systems don't do anything special |
79 // with two leading slashes, but FilePath handles this case properly | 79 // with two leading slashes, but FilePath handles this case properly |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 namespace stdext { | 372 namespace stdext { |
373 | 373 |
374 inline size_t hash_value(const FilePath& f) { | 374 inline size_t hash_value(const FilePath& f) { |
375 return hash_value(f.value()); | 375 return hash_value(f.value()); |
376 } | 376 } |
377 | 377 |
378 } // namespace stdext | 378 } // namespace stdext |
379 #endif // COMPILER | 379 #endif // COMPILER |
380 | 380 |
381 #endif // BASE_FILE_PATH_H_ | 381 #endif // BASE_FILE_PATH_H_ |
OLD | NEW |