| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 10 #pragma once |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 #if defined(OS_WIN) | 322 #if defined(OS_WIN) |
| 323 // Given an existing file in |path|, it returns in |real_path| the path | 323 // Given an existing file in |path|, it returns in |real_path| the path |
| 324 // in the native NT format, of the form "\Device\HarddiskVolumeXX\..". | 324 // in the native NT format, of the form "\Device\HarddiskVolumeXX\..". |
| 325 // Returns false it it fails. Empty files cannot be resolved with this | 325 // Returns false it it fails. Empty files cannot be resolved with this |
| 326 // function. | 326 // function. |
| 327 BASE_API bool NormalizeToNativeFilePath(const FilePath& path, | 327 BASE_API bool NormalizeToNativeFilePath(const FilePath& path, |
| 328 FilePath* nt_path); | 328 FilePath* nt_path); |
| 329 #endif | 329 #endif |
| 330 | 330 |
| 331 // This function will return if the given file is a symlink or not. |
| 332 BASE_API bool IsLink(const FilePath& file_path); |
| 333 |
| 331 // Returns information about the given file path. | 334 // Returns information about the given file path. |
| 332 BASE_API bool GetFileInfo(const FilePath& file_path, | 335 BASE_API bool GetFileInfo(const FilePath& file_path, |
| 333 base::PlatformFileInfo* info); | 336 base::PlatformFileInfo* info); |
| 334 | 337 |
| 335 // Sets the time of the last access and the time of the last modification. | 338 // Sets the time of the last access and the time of the last modification. |
| 336 BASE_API bool TouchFile(const FilePath& path, | 339 BASE_API bool TouchFile(const FilePath& path, |
| 337 const base::Time& last_accessed, | 340 const base::Time& last_accessed, |
| 338 const base::Time& last_modified); | 341 const base::Time& last_modified); |
| 339 | 342 |
| 340 // Set the time of the last modification. Useful for unit tests. | 343 // Set the time of the last modification. Useful for unit tests. |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 BASE_API bool GetFileSystemType(const FilePath& path, FileSystemType* type); | 654 BASE_API bool GetFileSystemType(const FilePath& path, FileSystemType* type); |
| 652 #endif | 655 #endif |
| 653 | 656 |
| 654 } // namespace file_util | 657 } // namespace file_util |
| 655 | 658 |
| 656 // Deprecated functions have been moved to this separate header file, | 659 // Deprecated functions have been moved to this separate header file, |
| 657 // which must be included last after all the above definitions. | 660 // which must be included last after all the above definitions. |
| 658 #include "base/file_util_deprecated.h" | 661 #include "base/file_util_deprecated.h" |
| 659 | 662 |
| 660 #endif // BASE_FILE_UTIL_H_ | 663 #endif // BASE_FILE_UTIL_H_ |
| OLD | NEW |