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

Unified Diff: runtime/bin/directory.dart

Issue 10414046: Add support for directory renaming to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 8 years, 7 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 | « runtime/bin/directory.cc ('k') | runtime/bin/directory_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory.dart
diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart
index 6cda57c8441a0995fc2160aedcc7114f8de03bfd..1fd96c9f222b1ee75868625c01641f8a439d9847 100644
--- a/runtime/bin/directory.dart
+++ b/runtime/bin/directory.dart
@@ -93,6 +93,26 @@ interface Directory default _Directory {
void deleteRecursivelySync();
/**
+ * Rename this directory. Returns a [:Future<Directory>:] that completes
+ * with a [Directory] instance for the renamed directory.
+ *
+ * If newPath identifies an existing directory, that directory is
+ * replaced. If newPath identifies an existing file the operation
+ * fails and the future completes with an exception.
+ */
+ Future<Directory> rename(String newPath);
+
+ /**
+ * Synchronously rename this directory. Returns a [Directory]
+ * instance for the renamed directory.
+ *
+ * If newPath identifies an existing directory, that directory is
+ * replaced. If newPath identifies an existing file the operation
+ * fails and an exception is thrown.
+ */
+ Directory renameSync(String newPath);
+
+ /**
* List the sub-directories and files of this
* [Directory]. Optionally recurse into sub-directories. Returns a
* [DirectoryLister] object representing the active listing
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698