OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 watcher.directory_watcher.linux; | 5 library watcher.directory_watcher.linux; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import '../directory_watcher.dart'; | 10 import '../directory_watcher.dart'; |
11 import '../utils.dart'; | 11 import '../utils.dart'; |
12 import '../watch_event.dart'; | 12 import '../watch_event.dart'; |
13 import 'resubscribable.dart'; | 13 import 'resubscribable.dart'; |
14 | 14 |
15 import 'package:stack_trace/stack_trace.dart'; | |
16 | |
17 /// Uses the inotify subsystem to watch for filesystem events. | 15 /// Uses the inotify subsystem to watch for filesystem events. |
18 /// | 16 /// |
19 /// Inotify doesn't suport recursively watching subdirectories, nor does | 17 /// Inotify doesn't suport recursively watching subdirectories, nor does |
20 /// [Directory.watch] polyfill that functionality. This class polyfills it | 18 /// [Directory.watch] polyfill that functionality. This class polyfills it |
21 /// instead. | 19 /// instead. |
22 /// | 20 /// |
23 /// This class also compensates for the non-inotify-specific issues of | 21 /// This class also compensates for the non-inotify-specific issues of |
24 /// [Directory.watch] producing multiple events for a single logical action | 22 /// [Directory.watch] producing multiple events for a single logical action |
25 /// (issue 14372) and providing insufficient information about move events | 23 /// (issue 14372) and providing insufficient information about move events |
26 /// (issue 14424). | 24 /// (issue 14424). |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 static const DIRECTORY = const _EntryState._("directory"); | 287 static const DIRECTORY = const _EntryState._("directory"); |
290 | 288 |
291 const _EntryState._(this._name); | 289 const _EntryState._(this._name); |
292 | 290 |
293 /// Returns [DIRECTORY] if [isDir] is true, and [FILE] otherwise. | 291 /// Returns [DIRECTORY] if [isDir] is true, and [FILE] otherwise. |
294 factory _EntryState(bool isDir) => | 292 factory _EntryState(bool isDir) => |
295 isDir ? _EntryState.DIRECTORY : _EntryState.FILE; | 293 isDir ? _EntryState.DIRECTORY : _EntryState.FILE; |
296 | 294 |
297 String toString() => _name; | 295 String toString() => _name; |
298 } | 296 } |
OLD | NEW |