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

Unified Diff: pkg/analyzer/lib/file_system/physical_file_system.dart

Issue 940313003: Add File.modificationStamp accessor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
Index: pkg/analyzer/lib/file_system/physical_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index 3f3e452a4afcbd73d87927002a9956d1ce972e4f..398e451d63e224e6d1dc6b1aefe501e6e1202a90 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -78,6 +78,16 @@ class _PhysicalFile extends _PhysicalResource implements File {
_PhysicalFile(io.File file) : super(file);
@override
+ int get modificationStamp {
+ try {
+ io.File file = _entry as io.File;
+ return file.lastModifiedSync().millisecondsSinceEpoch;
+ } on io.FileSystemException catch (exception) {
+ throw new FileSystemException(path, exception.message);
+ }
+ }
+
+ @override
Source createSource([Uri uri]) {
io.File file = _entry as io.File;
JavaFile javaFile = new JavaFile(file.absolute.path);

Powered by Google App Engine
This is Rietveld 408576698