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

Side by Side Diff: sdk/lib/io/file_impl.dart

Issue 12812010: dart:io | Add Link.targetSync on all platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improve copying of target string on Windows. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 7
8 class _FileStream extends Stream<List<int>> { 8 class _FileStream extends Stream<List<int>> {
9 // Stream controller. 9 // Stream controller.
10 StreamController<List<int>> _controller; 10 StreamController<List<int>> _controller;
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 throw _exceptionFromResponse(response, "Cannot create file '$_path'"); 294 throw _exceptionFromResponse(response, "Cannot create file '$_path'");
295 } 295 }
296 return this; 296 return this;
297 }); 297 });
298 } 298 }
299 299
300 external static _create(String path); 300 external static _create(String path);
301 301
302 external static _createLink(String path, String target); 302 external static _createLink(String path, String target);
303 303
304 external static _linkTarget(String path);
305
304 void createSync() { 306 void createSync() {
305 var result = _create(_path); 307 var result = _create(_path);
306 throwIfError(result, "Cannot create file '$_path'"); 308 throwIfError(result, "Cannot create file '$_path'");
307 } 309 }
308 310
309 Future<File> delete() { 311 Future<File> delete() {
310 _ensureFileService(); 312 _ensureFileService();
311 List request = new List(2); 313 List request = new List(2);
312 request[0] = _DELETE_REQUEST; 314 request[0] = _DELETE_REQUEST;
313 request[1] = _path; 315 request[1] = _path;
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 new FileIOException("File closed '$_path'")); 1045 new FileIOException("File closed '$_path'"));
1044 }); 1046 });
1045 return completer.future; 1047 return completer.future;
1046 } 1048 }
1047 1049
1048 final String _path; 1050 final String _path;
1049 int _id; 1051 int _id;
1050 1052
1051 SendPort _fileService; 1053 SendPort _fileService;
1052 } 1054 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698