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

Side by Side Diff: base/file_util.h

Issue 654013: Deprecate file_util::AppendToPath() on non-Windows. (Closed)
Patch Set: ok Created 10 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
« no previous file with comments | « no previous file | base/file_util.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) 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 // This file contains utility functions for dealing with the local 5 // This file contains utility functions for dealing with the local
6 // filesystem. 6 // filesystem.
7 7
8 #ifndef BASE_FILE_UTIL_H_ 8 #ifndef BASE_FILE_UTIL_H_
9 #define BASE_FILE_UTIL_H_ 9 #define BASE_FILE_UTIL_H_
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 //----------------------------------------------------------------------------- 42 //-----------------------------------------------------------------------------
43 // Functions that operate purely on a path string w/o touching the filesystem: 43 // Functions that operate purely on a path string w/o touching the filesystem:
44 44
45 // Returns true if the given path ends with a path separator character. 45 // Returns true if the given path ends with a path separator character.
46 bool EndsWithSeparator(const FilePath& path); 46 bool EndsWithSeparator(const FilePath& path);
47 47
48 // Makes sure that |path| ends with a separator IFF path is a directory that 48 // Makes sure that |path| ends with a separator IFF path is a directory that
49 // exists. Returns true if |path| is an existing directory, false otherwise. 49 // exists. Returns true if |path| is an existing directory, false otherwise.
50 bool EnsureEndsWithSeparator(FilePath* path); 50 bool EnsureEndsWithSeparator(FilePath* path);
51 51
52 // Appends new_ending to path, adding a separator between the two if necessary.
53 void AppendToPath(std::wstring* path, const std::wstring& new_ending);
54
55 // Convert provided relative path into an absolute path. Returns false on 52 // Convert provided relative path into an absolute path. Returns false on
56 // error. On POSIX, this function fails if the path does not exist. 53 // error. On POSIX, this function fails if the path does not exist.
57 bool AbsolutePath(FilePath* path); 54 bool AbsolutePath(FilePath* path);
58 55
59 // Returns true if |parent| contains |child|. Both paths are converted to 56 // Returns true if |parent| contains |child|. Both paths are converted to
60 // absolute paths before doing the comparison. 57 // absolute paths before doing the comparison.
61 bool ContainsPath(const FilePath& parent, const FilePath& child); 58 bool ContainsPath(const FilePath& parent, const FilePath& child);
62 59
63 //----------------------------------------------------------------------------- 60 //-----------------------------------------------------------------------------
64 // Functions that involve filesystem access or modification: 61 // Functions that involve filesystem access or modification:
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info, 495 bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
499 const base::Time& cutoff_time); 496 const base::Time& cutoff_time);
500 497
501 } // namespace file_util 498 } // namespace file_util
502 499
503 // Deprecated functions have been moved to this separate header file, 500 // Deprecated functions have been moved to this separate header file,
504 // which must be included last after all the above definitions. 501 // which must be included last after all the above definitions.
505 #include "base/file_util_deprecated.h" 502 #include "base/file_util_deprecated.h"
506 503
507 #endif // BASE_FILE_UTIL_H_ 504 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698