| 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_FILE_UTIL_H_ | 8 #ifndef BASE_FILE_UTIL_H_ |
| 9 #define BASE_FILE_UTIL_H_ | 9 #define BASE_FILE_UTIL_H_ |
| 10 | 10 |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 ~FileEnumerator(); | 494 ~FileEnumerator(); |
| 495 | 495 |
| 496 // Returns an empty string if there are no more results. | 496 // Returns an empty string if there are no more results. |
| 497 FilePath Next(); | 497 FilePath Next(); |
| 498 | 498 |
| 499 // Write the file info into |info|. | 499 // Write the file info into |info|. |
| 500 void GetFindInfo(FindInfo* info); | 500 void GetFindInfo(FindInfo* info); |
| 501 | 501 |
| 502 // Looks inside a FindInfo and determines if it's a directory. | 502 // Looks inside a FindInfo and determines if it's a directory. |
| 503 static bool IsDirectory(const FindInfo& info); | 503 static bool IsDirectory(const FindInfo& info); |
| 504 static bool IsLink(const FindInfo& info); | |
| 505 | 504 |
| 506 static FilePath GetFilename(const FindInfo& find_info); | 505 static FilePath GetFilename(const FindInfo& find_info); |
| 507 static int64 GetFilesize(const FindInfo& find_info); | 506 static int64 GetFilesize(const FindInfo& find_info); |
| 508 static base::Time GetLastModifiedTime(const FindInfo& find_info); | 507 static base::Time GetLastModifiedTime(const FindInfo& find_info); |
| 509 | 508 |
| 510 private: | 509 private: |
| 511 // Returns true if the given path should be skipped in enumeration. | 510 // Returns true if the given path should be skipped in enumeration. |
| 512 bool ShouldSkip(const FilePath& path); | 511 bool ShouldSkip(const FilePath& path); |
| 513 | 512 |
| 514 | 513 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 }; | 619 }; |
| 621 | 620 |
| 622 // Attempts determine the FileSystemType for |path|. | 621 // Attempts determine the FileSystemType for |path|. |
| 623 // Returns false if |path| doesn't exist. | 622 // Returns false if |path| doesn't exist. |
| 624 BASE_EXPORT bool GetFileSystemType(const FilePath& path, FileSystemType* type); | 623 BASE_EXPORT bool GetFileSystemType(const FilePath& path, FileSystemType* type); |
| 625 #endif | 624 #endif |
| 626 | 625 |
| 627 } // namespace file_util | 626 } // namespace file_util |
| 628 | 627 |
| 629 #endif // BASE_FILE_UTIL_H_ | 628 #endif // BASE_FILE_UTIL_H_ |
| OLD | NEW |