| 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.polling; | 5 library watcher.directory_watcher.polling; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:crypto/crypto.dart'; | 10 import 'package:crypto/crypto.dart'; |
| 11 | 11 |
| 12 import '../async_queue.dart'; | 12 import '../async_queue.dart'; |
| 13 import '../directory_watcher.dart'; | |
| 14 import '../stat.dart'; | 13 import '../stat.dart'; |
| 15 import '../utils.dart'; | 14 import '../utils.dart'; |
| 16 import '../watch_event.dart'; | 15 import '../watch_event.dart'; |
| 17 import 'resubscribable.dart'; | 16 import 'resubscribable.dart'; |
| 18 | 17 |
| 19 /// Periodically polls a directory for changes. | 18 /// Periodically polls a directory for changes. |
| 20 class PollingDirectoryWatcher extends ResubscribableDirectoryWatcher { | 19 class PollingDirectoryWatcher extends ResubscribableDirectoryWatcher { |
| 21 /// Creates a new polling watcher monitoring [directory]. | 20 /// Creates a new polling watcher monitoring [directory]. |
| 22 /// | 21 /// |
| 23 /// If [_pollingDelay] is passed, it specifies the amount of time the watcher | 22 /// If [_pollingDelay] is passed, it specifies the amount of time the watcher |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 class _FileStatus { | 207 class _FileStatus { |
| 209 /// The last time the file was modified. | 208 /// The last time the file was modified. |
| 210 DateTime modified; | 209 DateTime modified; |
| 211 | 210 |
| 212 /// The SHA-1 hash of the contents of the file. | 211 /// The SHA-1 hash of the contents of the file. |
| 213 List<int> hash; | 212 List<int> hash; |
| 214 | 213 |
| 215 _FileStatus(this.modified, this.hash); | 214 _FileStatus(this.modified, this.hash); |
| 216 } | 215 } |
| 217 | 216 |
| OLD | NEW |