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

Side by Side Diff: base/file_util.h

Issue 541022: Fix the case where the browser livelocks if we cannot open a file. (Closed)
Patch Set: Created 10 years, 11 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_posix.cc » ('j') | base/file_util_posix.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 bool CopyDirectory(const FilePath& from_path, const FilePath& to_path, 154 bool CopyDirectory(const FilePath& from_path, const FilePath& to_path,
155 bool recursive); 155 bool recursive);
156 // Deprecated temporary compatibility function. 156 // Deprecated temporary compatibility function.
157 bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path, 157 bool CopyDirectory(const std::wstring& from_path, const std::wstring& to_path,
158 bool recursive); 158 bool recursive);
159 159
160 // Returns true if the given path exists on the local filesystem, 160 // Returns true if the given path exists on the local filesystem,
161 // false otherwise. 161 // false otherwise.
162 bool PathExists(const FilePath& path); 162 bool PathExists(const FilePath& path);
163 163
164 // Returns true if the given path is readable by the user, false otherwise.
165 bool PathIsReadable(const FilePath& path);
166
164 // Returns true if the given path is writable by the user, false otherwise. 167 // Returns true if the given path is writable by the user, false otherwise.
165 bool PathIsWritable(const FilePath& path); 168 bool PathIsWritable(const FilePath& path);
166 169
167 // Returns true if the given path exists and is a directory, false otherwise. 170 // Returns true if the given path exists and is a directory, false otherwise.
168 bool DirectoryExists(const FilePath& path); 171 bool DirectoryExists(const FilePath& path);
169 172
170 #if defined(OS_WIN) 173 #if defined(OS_WIN)
171 // Gets the creation time of the given file (expressed in the local timezone), 174 // Gets the creation time of the given file (expressed in the local timezone),
172 // and returns it via the creation_time parameter. Returns true if successful, 175 // and returns it via the creation_time parameter. Returns true if successful,
173 // false otherwise. 176 // false otherwise.
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 const FilePath& source_file_path, 546 const FilePath& source_file_path,
544 const FilePath& target_file_path); 547 const FilePath& target_file_path);
545 548
546 // Returns whether the file has been modified since a particular date. 549 // Returns whether the file has been modified since a particular date.
547 bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info, 550 bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
548 const base::Time& cutoff_time); 551 const base::Time& cutoff_time);
549 552
550 } // namespace file_util 553 } // namespace file_util
551 554
552 #endif // BASE_FILE_UTIL_H_ 555 #endif // BASE_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | base/file_util_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698