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

Unified Diff: sdk/lib/io/directory.dart

Issue 12638039: dart:io | Add "followLinks" optional parameter to Directory.list, let it return Link objects when f… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Switch from Stream.reduce to Completer in link_test. Created 7 years, 9 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 | « sdk/lib/_internal/compiler/implementation/lib/io_patch.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/directory.dart
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index cf9ae48487f727c8fc12578447a84a6dff786e59..f9bcff5c17a2a629e0a17ba2f490c8952e32fead 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -134,19 +134,29 @@ abstract class Directory extends FileSystemEntity {
* Lists the sub-directories and files of this [Directory].
* Optionally recurses into sub-directories.
*
+ * If [followLinks] is false, then any symbolic links found
+ * are reported as links, rather than as directories or files,
+ * and are not recursed into.
+ *
* The result is a stream of [FileSystemEntity] objects
- * for the directories and files.
+ * for the directories, files, and links.
*/
- Stream<FileSystemEntity> list({bool recursive: false});
+ Stream<FileSystemEntity> list({bool recursive: false,
+ bool followLinks: true});
/**
* Lists the sub-directories and files of this [Directory].
* Optionally recurses into sub-directories.
*
+ * If [followLinks] is false, then any symbolic links found
+ * are reported as links, rather than as directories or files,
+ * and are not recursed into.
+ *
* Returns a [List] containing [FileSystemEntity] objects for the
- * directories and files.
+ * directories, files, and links.
*/
- List<FileSystemEntity> listSync({bool recursive: false});
+ List<FileSystemEntity> listSync({bool recursive: false,
+ bool followLinks: true});
/**
* Returns a human readable string for this Directory instance.
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/io_patch.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698