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

Unified Diff: pkg/analyzer/lib/file_system/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/file_system.dart
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index ff3e5ff926e277e0932989a785c7f3edda4f9f15..a53f0e6c069466dc6ebd357bc3dedb971fa1c953 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -16,6 +16,12 @@ import 'package:watcher/watcher.dart';
*/
abstract class File extends Resource {
/**
+ * Return the last-modified stamp of the file.
+ * Throws [FileSystemException] if the file does not exist.
+ */
+ int get modificationStamp;
+
+ /**
* Create a new [Source] instance that serves this file.
*/
Source createSource([Uri uri]);
@@ -23,6 +29,19 @@ abstract class File extends Resource {
/**
+ * Base class for all file system exceptions.
+ */
+class FileSystemException implements Exception {
+ final String path;
+ final String message;
+
+ FileSystemException(this.path, this.message);
+
+ String toString() => 'FileSystemException(path=$path; message=$message)';
+}
+
+
+/**
* [Folder]s are [Resource]s which may contain files and/or other folders.
*/
abstract class Folder extends Resource {

Powered by Google App Engine
This is Rietveld 408576698