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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 // Returns an empty string if there are no more results. | 462 // Returns an empty string if there are no more results. |
463 FilePath Next(); | 463 FilePath Next(); |
464 | 464 |
465 // Write the file info into |info|. | 465 // Write the file info into |info|. |
466 void GetFindInfo(FindInfo* info); | 466 void GetFindInfo(FindInfo* info); |
467 | 467 |
468 // Looks inside a FindInfo and determines if it's a directory. | 468 // Looks inside a FindInfo and determines if it's a directory. |
469 static bool IsDirectory(const FindInfo& info); | 469 static bool IsDirectory(const FindInfo& info); |
470 | 470 |
471 static FilePath GetFilename(const FindInfo& find_info); | 471 static FilePath GetFilename(const FindInfo& find_info); |
| 472 static int64 GetFilesize(const FindInfo& find_info); |
| 473 static base::Time GetLastModifiedTime(const FindInfo& find_info); |
472 | 474 |
473 private: | 475 private: |
474 // Returns true if the given path should be skipped in enumeration. | 476 // Returns true if the given path should be skipped in enumeration. |
475 bool ShouldSkip(const FilePath& path); | 477 bool ShouldSkip(const FilePath& path); |
476 | 478 |
477 | 479 |
478 #if defined(OS_WIN) | 480 #if defined(OS_WIN) |
479 // True when find_data_ is valid. | 481 // True when find_data_ is valid. |
480 bool has_find_data_; | 482 bool has_find_data_; |
481 WIN32_FIND_DATA find_data_; | 483 WIN32_FIND_DATA find_data_; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 BASE_API bool GetFileSystemType(const FilePath& path, FileSystemType* type); | 657 BASE_API bool GetFileSystemType(const FilePath& path, FileSystemType* type); |
656 #endif | 658 #endif |
657 | 659 |
658 } // namespace file_util | 660 } // namespace file_util |
659 | 661 |
660 // Deprecated functions have been moved to this separate header file, | 662 // Deprecated functions have been moved to this separate header file, |
661 // which must be included last after all the above definitions. | 663 // which must be included last after all the above definitions. |
662 #include "base/file_util_deprecated.h" | 664 #include "base/file_util_deprecated.h" |
663 | 665 |
664 #endif // BASE_FILE_UTIL_H_ | 666 #endif // BASE_FILE_UTIL_H_ |
OLD | NEW |