Index: base/platform_file.h |
=================================================================== |
--- base/platform_file.h (revision 58317) |
+++ base/platform_file.h (working copy) |
@@ -6,7 +6,9 @@ |
#define BASE_PLATFORM_FILE_H_ |
#pragma once |
+#include "base/basictypes.h" |
#include "build/build_config.h" |
+#include "base/time.h" |
#if defined(OS_WIN) |
#include <windows.h> |
#endif |
@@ -70,6 +72,28 @@ |
// Closes a file handle |
bool ClosePlatformFile(PlatformFile file); |
+// Used to hold information about a given file. |
+// If you add more fields to this structure (platform-specific fields are OK), |
+// make sure to update all functions that use it in file_util_{win|posix}.cc |
+// too, and the ParamTraits<base::PlatformFileInfo> implementation in |
+// chrome/common/common_param_traits.cc. |
+struct PlatformFileInfo { |
darin (slow to review)
2010/09/02 18:19:26
IIRC, the plan is to add more functions to this he
|
+ // The size of the file in bytes. Undefined when is_directory is true. |
+ int64 size; |
+ |
+ // True if the file corresponds to a directory. |
+ bool is_directory; |
+ |
+ // The last modified time of a file. |
+ base::Time last_modified; |
+ |
+ // The last accessed time of a file. |
+ base::Time last_accessed; |
+ |
+ // The creation time of a file. |
+ base::Time creation_time; |
+}; |
+ |
// Use this class to pass ownership of a PlatformFile to a receiver that may or |
// may not want to accept it. This class does not own the storage for the |
// PlatformFile. |