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

Unified Diff: utils/pub/io.dart

Issue 12211004: Get most pub IO tests passing on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utils/tests/pub/command_line_config.dart » ('j') | utils/tests/pub/command_line_config.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« no previous file with comments | « no previous file | utils/tests/pub/command_line_config.dart » ('j') | utils/tests/pub/command_line_config.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698