| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 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 | 
| 11 | 11 | 
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 455   // Returns true if the given path should be skipped in enumeration. | 455   // Returns true if the given path should be skipped in enumeration. | 
| 456   bool ShouldSkip(const FilePath& path); | 456   bool ShouldSkip(const FilePath& path); | 
| 457 | 457 | 
| 458 | 458 | 
| 459 #if defined(OS_WIN) | 459 #if defined(OS_WIN) | 
| 460   // True when find_data_ is valid. | 460   // True when find_data_ is valid. | 
| 461   bool has_find_data_; | 461   bool has_find_data_; | 
| 462   WIN32_FIND_DATA find_data_; | 462   WIN32_FIND_DATA find_data_; | 
| 463   HANDLE find_handle_; | 463   HANDLE find_handle_; | 
| 464 #elif defined(OS_POSIX) | 464 #elif defined(OS_POSIX) | 
| 465   typedef struct { | 465   struct DirectoryEntryInfo { | 
| 466     FilePath filename; | 466     FilePath filename; | 
| 467     struct stat stat; | 467     struct stat stat; | 
| 468   } DirectoryEntryInfo; | 468   }; | 
| 469 | 469 | 
| 470   // Read the filenames in source into the vector of DirectoryEntryInfo's | 470   // Read the filenames in source into the vector of DirectoryEntryInfo's | 
| 471   static bool ReadDirectory(std::vector<DirectoryEntryInfo>* entries, | 471   static bool ReadDirectory(std::vector<DirectoryEntryInfo>* entries, | 
| 472                             const FilePath& source, bool show_links); | 472                             const FilePath& source, bool show_links); | 
| 473 | 473 | 
| 474   // The files in the current directory | 474   // The files in the current directory | 
| 475   std::vector<DirectoryEntryInfo> directory_entries_; | 475   std::vector<DirectoryEntryInfo> directory_entries_; | 
| 476 | 476 | 
| 477   // The next entry to use from the directory_entries_ vector | 477   // The next entry to use from the directory_entries_ vector | 
| 478   size_t current_directory_entry_; | 478   size_t current_directory_entry_; | 
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 624 bool GetFileSystemType(const FilePath& path, FileSystemType* type); | 624 bool GetFileSystemType(const FilePath& path, FileSystemType* type); | 
| 625 #endif | 625 #endif | 
| 626 | 626 | 
| 627 }  // namespace file_util | 627 }  // namespace file_util | 
| 628 | 628 | 
| 629 // Deprecated functions have been moved to this separate header file, | 629 // Deprecated functions have been moved to this separate header file, | 
| 630 // which must be included last after all the above definitions. | 630 // which must be included last after all the above definitions. | 
| 631 #include "base/file_util_deprecated.h" | 631 #include "base/file_util_deprecated.h" | 
| 632 | 632 | 
| 633 #endif  // BASE_FILE_UTIL_H_ | 633 #endif  // BASE_FILE_UTIL_H_ | 
| OLD | NEW | 
|---|