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

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

Issue 57943002: Add fromUri constructor to File, Directory and Link (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added tests Created 7 years, 1 month 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/directory_impl.dart » ('j') | tests/standalone/io/link_uri_test.dart » ('J')
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 8f54a3928f142b13f8cb6c3026bf886f46542413..6d0119a3dafbb505ef23e7abc38571ff9504ca9c 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -16,6 +16,13 @@ abstract class Directory implements FileSystemEntity {
factory Directory(String path) => new _Directory(path);
/**
+ * Create a Directory object from a URI.
+ *
+ * If [uri] cannot reference a directory this throws [UnsupportedError].
+ */
+ factory Directory.fromUri(Uri uri) => new _Directory.fromUri(uri);
Anders Johnsen 2013/11/05 08:30:56 Just say 'new Directory(uri.toFilePath())' here? L
Søren Gjesse 2013/11/05 09:33:56 Of cause, done.
+
+ /**
* Creates a directory object pointing to the current working
* directory.
*/
« no previous file with comments | « no previous file | sdk/lib/io/directory_impl.dart » ('j') | tests/standalone/io/link_uri_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698