| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // the filesystem, are owned by the superuser, controlled by the group | 399 // the filesystem, are owned by the superuser, controlled by the group |
| 400 // "admin", are not writable by all users, and contain no symbolic links. | 400 // "admin", are not writable by all users, and contain no symbolic links. |
| 401 // Will return false if |path| does not exist. | 401 // Will return false if |path| does not exist. |
| 402 BASE_EXPORT bool VerifyPathControlledByAdmin(const base::FilePath& path); | 402 BASE_EXPORT bool VerifyPathControlledByAdmin(const base::FilePath& path); |
| 403 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 403 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 404 | 404 |
| 405 // Returns the maximum length of path component on the volume containing | 405 // Returns the maximum length of path component on the volume containing |
| 406 // the directory |path|, in the number of FilePath::CharType, or -1 on failure. | 406 // the directory |path|, in the number of FilePath::CharType, or -1 on failure. |
| 407 BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); | 407 BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); |
| 408 | 408 |
| 409 #if defined(OS_LINUX) | 409 #if defined(OS_LINUX) || defined(OS_AIX) |
| 410 // Broad categories of file systems as returned by statfs() on Linux. | 410 // Broad categories of file systems as returned by statfs() on Linux. |
| 411 enum FileSystemType { | 411 enum FileSystemType { |
| 412 FILE_SYSTEM_UNKNOWN, // statfs failed. | 412 FILE_SYSTEM_UNKNOWN, // statfs failed. |
| 413 FILE_SYSTEM_0, // statfs.f_type == 0 means unknown, may indicate AFS. | 413 FILE_SYSTEM_0, // statfs.f_type == 0 means unknown, may indicate AFS. |
| 414 FILE_SYSTEM_ORDINARY, // on-disk filesystem like ext2 | 414 FILE_SYSTEM_ORDINARY, // on-disk filesystem like ext2 |
| 415 FILE_SYSTEM_NFS, | 415 FILE_SYSTEM_NFS, |
| 416 FILE_SYSTEM_SMB, | 416 FILE_SYSTEM_SMB, |
| 417 FILE_SYSTEM_CODA, | 417 FILE_SYSTEM_CODA, |
| 418 FILE_SYSTEM_MEMORY, // in-memory file system | 418 FILE_SYSTEM_MEMORY, // in-memory file system |
| 419 FILE_SYSTEM_CGROUP, // cgroup control. | 419 FILE_SYSTEM_CGROUP, // cgroup control. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 450 // This function simulates Move(), but unlike Move() it works across volumes. | 450 // This function simulates Move(), but unlike Move() it works across volumes. |
| 451 // This function is not transactional. | 451 // This function is not transactional. |
| 452 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, | 452 BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path, |
| 453 const FilePath& to_path); | 453 const FilePath& to_path); |
| 454 #endif // defined(OS_WIN) | 454 #endif // defined(OS_WIN) |
| 455 | 455 |
| 456 } // namespace internal | 456 } // namespace internal |
| 457 } // namespace base | 457 } // namespace base |
| 458 | 458 |
| 459 #endif // BASE_FILES_FILE_UTIL_H_ | 459 #endif // BASE_FILES_FILE_UTIL_H_ |
| OLD | NEW |