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

Side by Side Diff: pkg/analyzer/lib/file_system/file_system.dart

Issue 1191933004: add file watching support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library file_system; 5 library file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:path/path.dart'; 10 import 'package:path/path.dart';
11 import 'package:watcher/watcher.dart'; 11 import 'package:watcher/watcher.dart';
12 12
13 /** 13 /**
14 * [File]s are leaf [Resource]s which contain data. 14 * [File]s are leaf [Resource]s which contain data.
15 */ 15 */
16 abstract class File extends Resource { 16 abstract class File extends Resource {
17 /** 17 /**
18 * Watch for changes to this file
19 */
20 Stream<WatchEvent> get changes;
21
22 /**
18 * Return the last-modified stamp of the file. 23 * Return the last-modified stamp of the file.
19 * Throws [FileSystemException] if the file does not exist. 24 * Throws [FileSystemException] if the file does not exist.
20 */ 25 */
21 int get modificationStamp; 26 int get modificationStamp;
22 27
23 /** 28 /**
24 * Create a new [Source] instance that serves this file. 29 * Create a new [Source] instance that serves this file.
25 */ 30 */
26 Source createSource([Uri uri]); 31 Source createSource([Uri uri]);
27 32
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 180 }
176 181
177 @override 182 @override
178 Uri restoreAbsolute(Source source) => source.uri; 183 Uri restoreAbsolute(Source source) => source.uri;
179 184
180 /** 185 /**
181 * Return `true` if the given [uri] is a `file` URI. 186 * Return `true` if the given [uri] is a `file` URI.
182 */ 187 */
183 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; 188 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME;
184 } 189 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698