Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1817)

Side by Side Diff: base/files/file_path.h

Issue 189333004: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util_win.cc ('k') | base/process/process_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // NOTE: this is different from the original file_util implementation which 239 // NOTE: this is different from the original file_util implementation which
240 // returned the extension without a leading "." ("jpg" instead of ".jpg") 240 // returned the extension without a leading "." ("jpg" instead of ".jpg")
241 StringType Extension() const; 241 StringType Extension() const;
242 242
243 // Returns the path's file extension, as in Extension(), but will 243 // Returns the path's file extension, as in Extension(), but will
244 // never return a double extension. 244 // never return a double extension.
245 // 245 //
246 // TODO(davidben): Check all our extension-sensitive code to see if 246 // TODO(davidben): Check all our extension-sensitive code to see if
247 // we can rename this to Extension() and the other to something like 247 // we can rename this to Extension() and the other to something like
248 // LongExtension(), defaulting to short extensions and leaving the 248 // LongExtension(), defaulting to short extensions and leaving the
249 // long "extensions" to logic like file_util::GetUniquePathNumber(). 249 // long "extensions" to logic like base::GetUniquePathNumber().
250 StringType FinalExtension() const; 250 StringType FinalExtension() const;
251 251
252 // Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg" 252 // Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
253 // NOTE: this is slightly different from the similar file_util implementation 253 // NOTE: this is slightly different from the similar file_util implementation
254 // which returned simply 'jojo'. 254 // which returned simply 'jojo'.
255 FilePath RemoveExtension() const WARN_UNUSED_RESULT; 255 FilePath RemoveExtension() const WARN_UNUSED_RESULT;
256 256
257 // Removes the path's file extension, as in RemoveExtension(), but 257 // Removes the path's file extension, as in RemoveExtension(), but
258 // ignores double extensions. 258 // ignores double extensions.
259 FilePath RemoveFinalExtension() const WARN_UNUSED_RESULT; 259 FilePath RemoveFinalExtension() const WARN_UNUSED_RESULT;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 inline size_t hash_value(const base::FilePath& f) { 463 inline size_t hash_value(const base::FilePath& f) {
464 return hash_value(f.value()); 464 return hash_value(f.value());
465 } 465 }
466 466
467 #endif // COMPILER 467 #endif // COMPILER
468 468
469 } // namespace BASE_HASH_NAMESPACE 469 } // namespace BASE_HASH_NAMESPACE
470 470
471 #endif // BASE_FILES_FILE_PATH_H_ 471 #endif // BASE_FILES_FILE_PATH_H_
OLDNEW
« no previous file with comments | « base/file_util_win.cc ('k') | base/process/process_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698