OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |