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

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

Issue 14642012: dart:io | Add asynchronous versions of the methods of FileSystemEntity and Link. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 years, 7 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 | « runtime/bin/file.cc ('k') | sdk/lib/io/file_system_entity.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 // Read the file in blocks of size 64k. 7 // Read the file in blocks of size 64k.
8 const int _BLOCK_SIZE = 64 * 1024; 8 const int _BLOCK_SIZE = 64 * 1024;
9 9
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const int _LENGTH_FROM_PATH_REQUEST = 11; 190 const int _LENGTH_FROM_PATH_REQUEST = 11;
191 const int _LAST_MODIFIED_REQUEST = 12; 191 const int _LAST_MODIFIED_REQUEST = 12;
192 const int _FLUSH_REQUEST = 13; 192 const int _FLUSH_REQUEST = 13;
193 const int _READ_BYTE_REQUEST = 14; 193 const int _READ_BYTE_REQUEST = 14;
194 const int _WRITE_BYTE_REQUEST = 15; 194 const int _WRITE_BYTE_REQUEST = 15;
195 const int _READ_REQUEST = 16; 195 const int _READ_REQUEST = 16;
196 const int _READ_LIST_REQUEST = 17; 196 const int _READ_LIST_REQUEST = 17;
197 const int _WRITE_LIST_REQUEST = 18; 197 const int _WRITE_LIST_REQUEST = 18;
198 const int _CREATE_LINK_REQUEST = 19; 198 const int _CREATE_LINK_REQUEST = 19;
199 const int _DELETE_LINK_REQUEST = 20; 199 const int _DELETE_LINK_REQUEST = 20;
200 const int _LINK_TARGET_REQUEST = 21;
200 201
201 // Base class for _File and _RandomAccessFile with shared functions. 202 // Base class for _File and _RandomAccessFile with shared functions.
202 class _FileBase { 203 class _FileBase {
203 bool _isErrorResponse(response) { 204 bool _isErrorResponse(response) {
204 return response is List && response[0] != _SUCCESS_RESPONSE; 205 return response is List && response[0] != _SUCCESS_RESPONSE;
205 } 206 }
206 207
207 _exceptionFromResponse(response, String message) { 208 _exceptionFromResponse(response, String message) {
208 assert(_isErrorResponse(response)); 209 assert(_isErrorResponse(response));
209 switch (response[_ERROR_RESPONSE_ERROR_TYPE]) { 210 switch (response[_ERROR_RESPONSE_ERROR_TYPE]) {
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 new FileIOException("File closed '$_path'")); 1030 new FileIOException("File closed '$_path'"));
1030 }); 1031 });
1031 return completer.future; 1032 return completer.future;
1032 } 1033 }
1033 1034
1034 final String _path; 1035 final String _path;
1035 int _id; 1036 int _id;
1036 1037
1037 SendPort _fileService; 1038 SendPort _fileService;
1038 } 1039 }
OLDNEW
« no previous file with comments | « runtime/bin/file.cc ('k') | sdk/lib/io/file_system_entity.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698