Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: third_party/pkg/angular/lib/tools/io_impl.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698