Index: Source/platform/FileMetadata.h |
diff --git a/Source/platform/FileMetadata.h b/Source/platform/FileMetadata.h |
index 924082dcb7e31dc8feb025293ea161f323ec9897..b2507b4cbdbfb8f99eb2b685b69da14d9bab7877 100644 |
--- a/Source/platform/FileMetadata.h |
+++ b/Source/platform/FileMetadata.h |
@@ -42,10 +42,18 @@ namespace blink { |
inline double invalidFileTime() { return std::numeric_limits<double>::quiet_NaN(); } |
inline bool isValidFileTime(double time) { return std::isfinite(time); } |
-struct FileMetadata { |
- // The last modification time of the file, in seconds. |
- // The value 0.0 means that the time is not set. |
- double modificationTime; |
+class FileMetadata { |
+public: |
+ FileMetadata() |
+ : modificationTimeMS(invalidFileTime()) |
+ , length(-1) |
+ , type(TypeUnknown) |
+ { |
+ } |
+ |
+ // The last modification time of the file, in milliseconds. |
+ // The value NaN means that the time is not known. |
+ double modificationTimeMS; |
// The length of the file in bytes. |
// The value -1 means that the length is not set. |
@@ -59,12 +67,10 @@ struct FileMetadata { |
Type type; |
String platformPath; |
- |
- FileMetadata() : modificationTime(invalidFileTime()), length(-1), type(TypeUnknown) { } |
}; |
PLATFORM_EXPORT bool getFileSize(const String&, long long& result); |
-PLATFORM_EXPORT bool getFileModificationTime(const String&, time_t& result); |
+PLATFORM_EXPORT bool getFileModificationTime(const String&, double& result); |
PLATFORM_EXPORT bool getFileMetadata(const String&, FileMetadata&); |
PLATFORM_EXPORT String directoryName(const String&); |
PLATFORM_EXPORT KURL filePathToURL(const String&); |