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

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

Issue 12691002: dart:io | Add Link class, as sibling to File and Directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Windows errors 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
« no previous file with comments | « sdk/lib/io/file.dart ('k') | sdk/lib/io/io.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return _fileService.call(request).then((response) { 292 return _fileService.call(request).then((response) {
293 if (_isErrorResponse(response)) { 293 if (_isErrorResponse(response)) {
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);
303
302 void createSync() { 304 void createSync() {
303 var result = _create(_path); 305 var result = _create(_path);
304 throwIfError(result, "Cannot create file '$_path'"); 306 throwIfError(result, "Cannot create file '$_path'");
305 } 307 }
306 308
307 Future<File> delete() { 309 Future<File> delete() {
308 _ensureFileService(); 310 _ensureFileService();
309 List request = new List(2); 311 List request = new List(2);
310 request[0] = _DELETE_REQUEST; 312 request[0] = _DELETE_REQUEST;
311 request[1] = _path; 313 request[1] = _path;
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 new FileIOException("File closed '$_path'")); 1043 new FileIOException("File closed '$_path'"));
1042 }); 1044 });
1043 return completer.future; 1045 return completer.future;
1044 } 1046 }
1045 1047
1046 final String _path; 1048 final String _path;
1047 int _id; 1049 int _id;
1048 1050
1049 SendPort _fileService; 1051 SendPort _fileService;
1050 } 1052 }
OLDNEW
« no previous file with comments | « sdk/lib/io/file.dart ('k') | sdk/lib/io/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698