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

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

Issue 1181663002: Add Resource class. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add suppression for analyzer warnings. Created 5 years, 5 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/pkg.status » ('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 18 * Watch for changes to this file
19 */ 19 */
20 Stream<WatchEvent> get changes; 20 Stream<WatchEvent> get changes;
21 21
22 /** 22 /**
23 * Return the last-modified stamp of the file. 23 * Return the last-modified stamp of the file.
24 * Throws [FileSystemException] if the file does not exist. 24 * Throws [FileSystemException] if the file does not exist.
25 */ 25 */
26 int get modificationStamp; 26 int get modificationStamp;
27 27
28 /** 28 /**
29 * Create a new [Source] instance that serves this file. 29 * Create a new [Source] instance that serves this file.
30 */ 30 */
31 Source createSource([Uri uri]); 31 Source createSource([Uri uri]);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 181
182 @override 182 @override
183 Uri restoreAbsolute(Source source) => source.uri; 183 Uri restoreAbsolute(Source source) => source.uri;
184 184
185 /** 185 /**
186 * Return `true` if the given [uri] is a `file` URI. 186 * Return `true` if the given [uri] is a `file` URI.
187 */ 187 */
188 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; 188 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME;
189 } 189 }
OLDNEW
« no previous file with comments | « no previous file | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698