Chromium Code Reviews| Index: utils/pub/io.dart |
| diff --git a/utils/pub/io.dart b/utils/pub/io.dart |
| index c81da000b73e479d9366db42cbd8b9770f14138c..e466b7a169f521cbad3b41b8d41bb6b18a117162 100644 |
| --- a/utils/pub/io.dart |
| +++ b/utils/pub/io.dart |
| @@ -179,6 +179,8 @@ Future<Directory> deleteDir(dir) { |
| /// `false`). |
| /// |
| /// If [dir] is a string, the returned paths are guaranteed to begin with it. |
| +/// |
| +/// Note that on Windows, only directories may be symlinked to. |
|
nweiz
2013/02/05 03:26:14
Is this note supposed to be on createSymlink?
Bob Nystrom
2013/02/05 04:21:53
Done.
|
| Future<List<String>> listDir(dir, |
| {bool recursive: false, bool includeHiddenFiles: false}) { |
| Future<List<String>> doList(Directory dir, Set<String> listedDirectories) { |
| @@ -190,6 +192,7 @@ Future<List<String>> listDir(dir, |
| if (listedDirectories.contains(resolvedPath)) { |
| return new Future.immediate([]); |
| } |
| + |
| listedDirectories = new Set<String>.from(listedDirectories); |
| listedDirectories.add(resolvedPath); |
| @@ -220,7 +223,6 @@ Future<List<String>> listDir(dir, |
| if (!includeHiddenFiles && basename(file).startsWith('.')) return; |
| file = join(dir, basename(file)); |
| contents.add(file); |
| - |
| // TODO(nweiz): don't manually recurse once issue 7358 is fixed. Note that |
| // once we remove the manual recursion, we'll need to explicitly filter |
| // out files in hidden directories. |
| @@ -228,6 +230,7 @@ Future<List<String>> listDir(dir, |
| children.add(doList(new Directory(file), listedDirectories)); |
| } |
| }; |
| + |
| lister.onFile = (file) { |
| if (!includeHiddenFiles && basename(file).startsWith('.')) return; |
| contents.add(join(dir, basename(file))); |