Index: sdk/lib/io/link.dart |
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart |
index cc347800423b6011212a84ebdd328fecdd03bc46..31028186dd2da7bfbab56824df0aa045783bd233 100644 |
--- a/sdk/lib/io/link.dart |
+++ b/sdk/lib/io/link.dart |
@@ -168,7 +168,7 @@ class _Link extends FileSystemEntity implements Link { |
var result = |
recursive ? parent.create(recursive: true) : new Future.value(null); |
return result |
- .then((_) => _IOService._dispatch(_FILE_CREATE_LINK, [path, target])) |
+ .then((_) => _File._dispatchWithNamespace(_FILE_CREATE_LINK, [null, path, target])) |
.then((response) { |
if (_isErrorResponse(response)) { |
throw _exceptionFromResponse( |
@@ -185,7 +185,7 @@ class _Link extends FileSystemEntity implements Link { |
if (Platform.isWindows) { |
target = _makeWindowsLinkTarget(target); |
} |
- var result = _File._createLink(path, target); |
+ var result = _File._createLink(_Namespace._namespace, path, target); |
throwIfError(result, "Cannot create link", path); |
} |
@@ -225,7 +225,8 @@ class _Link extends FileSystemEntity implements Link { |
if (recursive) { |
return new Directory(path).delete(recursive: true).then((_) => this); |
} |
- return _IOService._dispatch(_FILE_DELETE_LINK, [path]).then((response) { |
+ return _File._dispatchWithNamespace(_FILE_DELETE_LINK, [null, path]) |
+ .then((response) { |
if (_isErrorResponse(response)) { |
throw _exceptionFromResponse(response, "Cannot delete link", path); |
} |
@@ -237,13 +238,14 @@ class _Link extends FileSystemEntity implements Link { |
if (recursive) { |
return new Directory(path).deleteSync(recursive: true); |
} |
- var result = _File._deleteLinkNative(path); |
+ var result = _File._deleteLinkNative(_Namespace._namespace, path); |
throwIfError(result, "Cannot delete link", path); |
} |
Future<Link> rename(String newPath) { |
- return _IOService |
- ._dispatch(_FILE_RENAME_LINK, [path, newPath]).then((response) { |
+ return _File |
+ ._dispatchWithNamespace(_FILE_RENAME_LINK, [null, path, newPath]) |
+ .then((response) { |
if (_isErrorResponse(response)) { |
throw _exceptionFromResponse( |
response, "Cannot rename link to '$newPath'", path); |
@@ -253,13 +255,14 @@ class _Link extends FileSystemEntity implements Link { |
} |
Link renameSync(String newPath) { |
- var result = _File._renameLink(path, newPath); |
+ var result = _File._renameLink(_Namespace._namespace, path, newPath); |
throwIfError(result, "Cannot rename link '$path' to '$newPath'"); |
return new Link(newPath); |
} |
Future<String> target() { |
- return _IOService._dispatch(_FILE_LINK_TARGET, [path]).then((response) { |
+ return _File._dispatchWithNamespace(_FILE_LINK_TARGET, [null, path]) |
+ .then((response) { |
if (_isErrorResponse(response)) { |
throw _exceptionFromResponse( |
response, "Cannot get target of link", path); |
@@ -269,7 +272,7 @@ class _Link extends FileSystemEntity implements Link { |
} |
String targetSync() { |
- var result = _File._linkTarget(path); |
+ var result = _File._linkTarget(_Namespace._namespace, path); |
throwIfError(result, "Cannot read link", path); |
return result; |
} |