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

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

Issue 23444037: dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Document resolution of link\.. on Windows. Created 7 years, 3 months 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
Index: sdk/lib/io/file_impl.dart
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index ba6b64279c3bfa5231912cb10b73dd69a7cfd554..0ce39ad7ff2ffdcf047bee55e848ac4ba3031d44 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -204,7 +204,7 @@ const int _CREATE_REQUEST = 1;
const int _DELETE_REQUEST = 2;
const int _RENAME_REQUEST = 3;
const int _OPEN_REQUEST = 4;
-const int _FULL_PATH_REQUEST = 5;
+const int _RESOLVE_SYMBOLIC_LINKS_REQUEST = 5;
const int _CLOSE_REQUEST = 6;
const int _POSITION_REQUEST = 7;
const int _SET_POSITION_REQUEST = 8;
@@ -444,29 +444,33 @@ class _File extends FileSystemEntity implements File {
return new _RandomAccessFile(id, "");
}
- Future<String> fullPath() {
+ Future<String> resolveSymbolicLinks() {
_ensureFileService();
List request = new List(2);
- request[0] = _FULL_PATH_REQUEST;
+ request[0] = _RESOLVE_SYMBOLIC_LINKS_REQUEST;
request[1] = path;
return _fileService.call(request).then((response) {
if (_isErrorResponse(response)) {
throw _exceptionFromResponse(response,
- "Cannot retrieve full path",
+ "Cannot resolve symbolic links",
path);
}
return response;
});
}
- external static _fullPath(String path);
+ Future<String> fullPath() => resolveSymbolicLinks();
Anders Johnsen 2013/09/09 12:24:48 This looks odd. Deprecate fullPath?
Søren Gjesse 2013/09/11 07:21:01 We should set a deadline for when fullPath is remo
Bill Hesse 2013/09/13 06:34:13 Deprecated, with deadline added.
- String fullPathSync() {
- var result = _fullPath(path);
- throwIfError(result, "Cannot retrieve full path", path);
+ external static _resolveSymbolicLinks(String path);
+
+ String resolveSymbolicLinksSync() {
+ var result = _resolveSymbolicLinks(path);
+ throwIfError(result, "Cannot resolve symbolic links", path);
return result;
}
+ String fullPathSync() => resolveSymbolicLinksSync();
+
Stream<List<int>> openRead([int start, int end]) {
return new _FileStream(path, start, end);
}

Powered by Google App Engine
This is Rietveld 408576698