| OLD | NEW |
| 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 // 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_FILES_FILE_UTIL_H_ | 8 #ifndef BASE_FILES_FILE_UTIL_H_ |
| 9 #define BASE_FILES_FILE_UTIL_H_ | 9 #define BASE_FILES_FILE_UTIL_H_ |
| 10 | 10 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // a drive letter ("C:\..."). Return false if no such path exists. | 281 // a drive letter ("C:\..."). Return false if no such path exists. |
| 282 BASE_EXPORT bool DevicePathToDriveLetterPath(const FilePath& device_path, | 282 BASE_EXPORT bool DevicePathToDriveLetterPath(const FilePath& device_path, |
| 283 FilePath* drive_letter_path); | 283 FilePath* drive_letter_path); |
| 284 | 284 |
| 285 // Given an existing file in |path|, set |real_path| to the path | 285 // Given an existing file in |path|, set |real_path| to the path |
| 286 // in native NT format, of the form "\Device\HarddiskVolumeXX\..". | 286 // in native NT format, of the form "\Device\HarddiskVolumeXX\..". |
| 287 // Returns false if the path can not be found. Empty files cannot | 287 // Returns false if the path can not be found. Empty files cannot |
| 288 // be resolved with this function. | 288 // be resolved with this function. |
| 289 BASE_EXPORT bool NormalizeToNativeFilePath(const FilePath& path, | 289 BASE_EXPORT bool NormalizeToNativeFilePath(const FilePath& path, |
| 290 FilePath* nt_path); | 290 FilePath* nt_path); |
| 291 |
| 292 // Given an existing file in |path|, returns whether this file is on a network |
| 293 // drive or not. |
| 294 BASE_EXPORT bool IsOnNetworkDrive(const base::FilePath& path); |
| 291 #endif | 295 #endif |
| 292 | 296 |
| 293 // This function will return if the given file is a symlink or not. | 297 // This function will return if the given file is a symlink or not. |
| 294 BASE_EXPORT bool IsLink(const FilePath& file_path); | 298 BASE_EXPORT bool IsLink(const FilePath& file_path); |
| 295 | 299 |
| 296 // Returns information about the given file path. | 300 // Returns information about the given file path. |
| 297 BASE_EXPORT bool GetFileInfo(const FilePath& file_path, File::Info* info); | 301 BASE_EXPORT bool GetFileInfo(const FilePath& file_path, File::Info* info); |
| 298 | 302 |
| 299 // Sets the time of the last access and the time of the last modification. | 303 // Sets the time of the last access and the time of the last modification. |
| 300 BASE_EXPORT bool TouchFile(const FilePath& path, | 304 BASE_EXPORT bool TouchFile(const FilePath& path, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 // This function simulates Move(), but unlike Move() it works across volumes. | 435 // This function simulates Move(), but unlike Move() it works across volumes. |
| 432 // This function is not transactional. | 436 // This function is not transactional. |
| 433 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, | 437 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, |
| 434 const FilePath& to_path); | 438 const FilePath& to_path); |
| 435 #endif // defined(OS_WIN) | 439 #endif // defined(OS_WIN) |
| 436 | 440 |
| 437 } // namespace internal | 441 } // namespace internal |
| 438 } // namespace base | 442 } // namespace base |
| 439 | 443 |
| 440 #endif // BASE_FILES_FILE_UTIL_H_ | 444 #endif // BASE_FILES_FILE_UTIL_H_ |
| OLD | NEW |