Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1064)

Unified Diff: base/platform_file.h

Issue 3347005: Moving file_util::FileInfo to base::PlatformFileInfo, and adding the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_win.cc ('k') | base/time.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « base/file_util_win.cc ('k') | base/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698