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

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

Issue 13818010: dart:io | Ensure that Directory.list terminates even when symbolic links create loops in the file s… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add documentation of new behavior. Created 7 years, 8 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
Index: sdk/lib/io/directory.dart
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index b1eca17dd6180bd502af8e962d51712cec950f04..8c0ad5abd05cf07d234a26a0e0a001a8241cd45d 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -152,7 +152,11 @@ abstract class Directory extends FileSystemEntity {
* If [followLinks] is true, then working links are reported as
* directories or files, depending on
* their type, and links to directories are recursed into.
- * Broken links are reported as [Link] objects,
+ * Broken links are reported as [Link] objects.
+ * If a symbolic link makes a loop in the file system, then a recursive
+ * listing will not follow a link twice in the
+ * same recursive descent, but will report it as a [Link]
+ * the second time it is seen.
*
* The result is a stream of [FileSystemEntity] objects
* for the directories, files, and links.
@@ -171,7 +175,11 @@ abstract class Directory extends FileSystemEntity {
* If [followLinks] is true, then working links are reported as
* directories or files, depending on
* their type, and links to directories are recursed into.
- * Broken links are reported as [Link] objects,
+ * Broken links are reported as [Link] objects.
+ * If a link makes a loop in the file system, then a recursive
+ * listing will not follow a link twice in the
+ * same recursive descent, but will report it as a [Link]
+ * the second time it is seen.
*
* Returns a [List] containing [FileSystemEntity] objects for the
* directories, files, and links.

Powered by Google App Engine
This is Rietveld 408576698