Index: tools/line_doc_comments.dart |
diff --git a/tools/line_doc_comments.dart b/tools/line_doc_comments.dart |
index aa7627cc0d977cb5161253bafe60da3e50caa50b..a51d84d08dd6b4567d12026b6d83bb0bc531dbf9 100755 |
--- a/tools/line_doc_comments.dart |
+++ b/tools/line_doc_comments.dart |
@@ -22,11 +22,14 @@ main() { |
} |
var dir = new Directory(args[0]); |
- var lister = dir.list(recursive: true); |
- lister.onFile = (file) { |
- if (path.extension(file) != '.dart') return; |
- fixFile(file); |
- }; |
+ dir.list(recursive: true).listen( |
+ (entity) { |
+ if (entity is File) { |
+ var file = entity.name; |
+ if (path.extension(file) != '.dart') return; |
+ fixFile(file); |
+ } |
+ }); |
} |
void fixFile(String path) { |