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

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

Issue 2660703002: Filter out 'FileSystemException: Failed to watch path' from _PhysicalFolder.changes. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 analyzer.file_system.physical_file_system; 5 library analyzer.file_system.physical_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core'; 8 import 'dart:core';
9 import 'dart:io' as io; 9 import 'dart:io' as io;
10 10
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 } 220 }
221 221
222 /** 222 /**
223 * A `dart:io` based implementation of [Folder]. 223 * A `dart:io` based implementation of [Folder].
224 */ 224 */
225 class _PhysicalFolder extends _PhysicalResource implements Folder { 225 class _PhysicalFolder extends _PhysicalResource implements Folder {
226 _PhysicalFolder(io.Directory directory) : super(directory); 226 _PhysicalFolder(io.Directory directory) : super(directory);
227 227
228 @override 228 @override
229 Stream<WatchEvent> get changes => new DirectoryWatcher(_entry.path).events; 229 Stream<WatchEvent> get changes => new DirectoryWatcher(_entry.path)
230 .events
231 .handleError(() {}, test: (error) => error is io.FileSystemException);
230 232
231 /** 233 /**
232 * Return the underlying file being represented by this wrapper. 234 * Return the underlying file being represented by this wrapper.
233 */ 235 */
234 io.Directory get _directory => _entry as io.Directory; 236 io.Directory get _directory => _entry as io.Directory;
235 237
236 @override 238 @override
237 String canonicalizePath(String relPath) { 239 String canonicalizePath(String relPath) {
238 return normalize(join(path, relPath)); 240 return normalize(join(path, relPath));
239 } 241 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 timer.cancel(); 415 timer.cancel();
414 } 416 }
415 }); 417 });
416 return completer.future; 418 return completer.future;
417 } 419 }
418 _isSpawning = true; 420 _isSpawning = true;
419 _runner = await IsolateRunner.spawn(); 421 _runner = await IsolateRunner.spawn();
420 return _runner; 422 return _runner;
421 } 423 }
422 } 424 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698