Index: sdk/lib/io/link.dart |
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart |
index 82aef2a5450b9f971921fd6e8a3e909fbf2c921c..7f07234ab54dc3f343009605ddbc721bc8de56f9 100644 |
--- a/sdk/lib/io/link.dart |
+++ b/sdk/lib/io/link.dart |
@@ -15,6 +15,13 @@ abstract class Link implements FileSystemEntity { |
factory Link(String path) => new _Link(path); |
/** |
+ * Create a Lint object from a URI. |
+ * |
+ * If [uri] cannot reference a link this throws [UnsupportedError]. |
+ */ |
+ factory Link.fromUri(Uri uri) => new Link(uri.toFilePath()); |
+ |
+ /** |
* Creates a symbolic link. Returns a [:Future<Link>:] that completes with |
* the link when it has been created. If the link exists, |
* the future will complete with an error. |
@@ -143,7 +150,6 @@ class _Link extends FileSystemEntity implements Link { |
} |
} |
- |
String toString() => "Link: '$path'"; |
Future<bool> exists() => FileSystemEntity.isLink(path); |