| OLD | NEW |
| 1 library angular.io_impl; | 1 library angular.io_impl; |
| 2 | 2 |
| 3 import 'dart:io'; | 3 import 'dart:io'; |
| 4 import 'io.dart'; | 4 import 'package:angular/tools/io.dart'; |
| 5 | 5 |
| 6 class IoServiceImpl implements IoService { | 6 class IoServiceImpl implements IoService { |
| 7 | 7 |
| 8 String readAsStringSync(String filePath) => | 8 String readAsStringSync(String filePath) => |
| 9 new File(filePath).readAsStringSync(); | 9 new File(filePath).readAsStringSync(); |
| 10 | 10 |
| 11 void visitFs(String rootDir, FsVisitor visitor) { | 11 void visitFs(String rootDir, FsVisitor visitor) { |
| 12 Directory root = new Directory(rootDir); | 12 Directory root = new Directory(rootDir); |
| 13 if (!FileSystemEntity.isDirectorySync(rootDir)) { | 13 if (!FileSystemEntity.isDirectorySync(rootDir)) { |
| 14 throw 'Expected $rootDir to be a directory!'; | 14 throw 'Expected $rootDir to be a directory!'; |
| 15 } | 15 } |
| 16 root.listSync(recursive: true, followLinks: true).forEach((entity) { | 16 root.listSync(recursive: true, followLinks: true).forEach((entity) { |
| 17 if (entity.statSync().type == FileSystemEntityType.FILE) { | 17 if (entity.statSync().type == FileSystemEntityType.FILE) { |
| 18 visitor(entity.path); | 18 visitor(entity.path); |
| 19 } | 19 } |
| 20 }); | 20 }); |
| 21 } | 21 } |
| 22 } | 22 } |
| OLD | NEW |