| Index: sdk/lib/io/link.dart
|
| diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
|
| index 3df3fc9f1d5692534f1556aa1b69dae5303b7a8c..6d6b2a54118c186bcd844b0bb09ab434bf2b17b7 100644
|
| --- a/sdk/lib/io/link.dart
|
| +++ b/sdk/lib/io/link.dart
|
| @@ -64,6 +64,10 @@ abstract class Link implements FileSystemEntity {
|
| */
|
| Future<Link> update(String target);
|
|
|
| + Future<String> resolveSymbolicLinks();
|
| +
|
| + String resolveSymbolicLinksSync();
|
| +
|
| /**
|
| * Renames this link. Returns a `Future<Link>` that completes
|
| * with a [Link] instance for the renamed link.
|
| @@ -220,6 +224,29 @@ class _Link extends FileSystemEntity implements Link {
|
| throwIfError(result, "Cannot delete link", path);
|
| }
|
|
|
| + Future<String> resolveSymbolicLinks() {
|
| + _ensureFileService();
|
| + List request = new List(2);
|
| + request[0] = _RESOLVE_SYMBOLIC_LINKS_REQUEST;
|
| + request[1] = path;
|
| + return _fileService.call(request).then((response) {
|
| + if (_isErrorResponse(response)) {
|
| + throw _exceptionFromResponse(
|
| + response, "Cannot resolve symbolic links", path);
|
| + }
|
| + return response;
|
| + });
|
| + }
|
| +
|
| + String resolveSymbolicLinksSync() {
|
| + var result = _File._resolveSymbolicLinks(path);
|
| + if (result is OSError) {
|
| + throw new LinkException(
|
| + "Cannot resolve symbolic links", path, result);
|
| + }
|
| + return result;
|
| + }
|
| +
|
| Future<Link> rename(String newPath) {
|
| _ensureFileService();
|
| List request = new List(3);
|
|
|