Index: sdk/lib/io/link.dart |
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart |
index 3df3fc9f1d5692534f1556aa1b69dae5303b7a8c..83cd22379a1ad6f4556aec92b22ae5c741deb1a1 100644 |
--- a/sdk/lib/io/link.dart |
+++ b/sdk/lib/io/link.dart |
@@ -85,6 +85,15 @@ abstract class Link implements FileSystemEntity { |
Link renameSync(String newPath); |
/** |
+ * Returns a [Link] instance whose path is the absolute path to [this]. |
+ * |
+ * The absolute path is computed by prefixing |
+ * a relative path with the current working directory, and returning |
+ * an absolute path unchanged. |
+ */ |
+ Link get absolute; |
+ |
+ /** |
* Gets the target of the link. Returns a future that completes with |
* the path to the target. |
* |
@@ -127,6 +136,8 @@ class _Link extends FileSystemEntity implements Link { |
bool existsSync() => FileSystemEntity.isLinkSync(path); |
+ Link get absolute => new Link(_absolutePath); |
+ |
Future<FileStat> stat() => FileStat.stat(path); |
FileStat statSync() => FileStat.statSync(path); |