| 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'; | |
| 11 import '../utils.dart'; | 10 import '../utils.dart'; |
| 12 import '../watch_event.dart'; | 11 import '../watch_event.dart'; |
| 13 import 'resubscribable.dart'; | 12 import 'resubscribable.dart'; |
| 14 | 13 |
| 15 /// Uses the inotify subsystem to watch for filesystem events. | 14 /// Uses the inotify subsystem to watch for filesystem events. |
| 16 /// | 15 /// |
| 17 /// Inotify doesn't suport recursively watching subdirectories, nor does | 16 /// Inotify doesn't suport recursively watching subdirectories, nor does |
| 18 /// [Directory.watch] polyfill that functionality. This class polyfills it | 17 /// [Directory.watch] polyfill that functionality. This class polyfills it |
| 19 /// instead. | 18 /// instead. |
| 20 /// | 19 /// |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 static const DIRECTORY = const _EntryState._("directory"); | 286 static const DIRECTORY = const _EntryState._("directory"); |
| 288 | 287 |
| 289 const _EntryState._(this._name); | 288 const _EntryState._(this._name); |
| 290 | 289 |
| 291 /// Returns [DIRECTORY] if [isDir] is true, and [FILE] otherwise. | 290 /// Returns [DIRECTORY] if [isDir] is true, and [FILE] otherwise. |
| 292 factory _EntryState(bool isDir) => | 291 factory _EntryState(bool isDir) => |
| 293 isDir ? _EntryState.DIRECTORY : _EntryState.FILE; | 292 isDir ? _EntryState.DIRECTORY : _EntryState.FILE; |
| 294 | 293 |
| 295 String toString() => _name; | 294 String toString() => _name; |
| 296 } | 295 } |
| OLD | NEW |