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

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

Issue 13862003: dart:io | Add documentation changes to Link, File and Directory delete methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments 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
« no previous file with comments | « no previous file | sdk/lib/io/file.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 f9bcff5c17a2a629e0a17ba2f490c8952e32fead..b1eca17dd6180bd502af8e962d51712cec950f04 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -87,10 +87,16 @@ abstract class Directory extends FileSystemEntity {
/**
* Deletes this directory.
*
- * If [recursive] is false, the directory must be empty.
+ * If [recursive] is false, the directory must be empty. Only directories
+ * and links to directories will be deleted.
*
* If [recursive] is true, this directory and all sub-directories
- * and files in the directories are deleted.
+ * and files in the directories are deleted. Links are not followed
+ * when deleting recursively. Only the link is deleted, not its target.
+ *
+ * If [recursive] is true, the target is deleted even if it is a file, or
+ * a link to a file, not only if it is a directory. This behavior allows
+ * [delete] to be used to unconditionally delete any file system object.
*
* Returns a [:Future<Directory>:] that completes with this
* directory when the deletion is done. If the directory cannot be
@@ -104,7 +110,12 @@ abstract class Directory extends FileSystemEntity {
* If [recursive] is false, the directory must be empty.
*
* If [recursive] is true, this directory and all sub-directories
- * and files in the directories are deleted.
+ * and files in the directories are deleted. Links are not followed
+ * when deleting recursively. Only the link is deleted, not its target.
+ *
+ * If [recursive] is true, the target is deleted even if it is a file, or
+ * a link to a file, not only if it is a directory. This behavior allows
+ * [delete] to be used to unconditionally delete any file system object.
*
* Throws an exception if the directory cannot be deleted.
*/
@@ -135,9 +146,14 @@ abstract class Directory extends FileSystemEntity {
* Optionally recurses into sub-directories.
*
* If [followLinks] is false, then any symbolic links found
- * are reported as links, rather than as directories or files,
+ * are reported as [Link] objects, rather than as directories or files,
* and are not recursed into.
*
+ * 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,
+ *
* The result is a stream of [FileSystemEntity] objects
* for the directories, files, and links.
*/
@@ -149,9 +165,14 @@ abstract class Directory extends FileSystemEntity {
* Optionally recurses into sub-directories.
*
* If [followLinks] is false, then any symbolic links found
- * are reported as links, rather than as directories or files,
+ * are reported as [Link] objects, rather than as directories or files,
* and are not recursed into.
*
+ * 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,
+ *
* Returns a [List] containing [FileSystemEntity] objects for the
* directories, files, and links.
*/
« no previous file with comments | « no previous file | sdk/lib/io/file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698