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

Side by Side Diff: runtime/bin/directory_impl.dart

Issue 8431028: Implement async file API on top of isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type mismatch. Created 9 years, 1 month 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/builtin_in.cc ('k') | runtime/bin/file.cc » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 5
6 class _DirectoryListingIsolate extends Isolate { 6 class _DirectoryListingIsolate extends Isolate {
7 7
8 _DirectoryListingIsolate() : super.heavy(); 8 _DirectoryListingIsolate() : super.heavy();
9 9
10 void main() { 10 void main() {
11 port.receive((message, replyTo) { 11 port.receive((message, replyTo) {
12 bool started = _list(message['dir'], 12 bool started = _list(message['dir'],
13 message['recursive'], 13 message['recursive'],
14 message['dirPort'], 14 message['dirPort'],
15 message['filePort'], 15 message['filePort'],
16 message['donePort'], 16 message['donePort'],
17 message['errorPort']); 17 message['errorPort']);
18 replyTo.send(started); 18 replyTo.send(started);
19 port.close();
19 }); 20 });
20 } 21 }
21 22
22 bool _list(String dir, 23 bool _list(String dir,
23 bool recursive, 24 bool recursive,
24 SendPort dirPort, 25 SendPort dirPort,
25 SendPort filePort, 26 SendPort filePort,
26 SendPort donePort, 27 SendPort donePort,
27 SendPort errorPort) native "Directory_List"; 28 SendPort errorPort) native "Directory_List";
28 } 29 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool _create(String path) native "Directory_Create"; 148 bool _create(String path) native "Directory_Create";
148 bool _delete(String path) native "Directory_Delete"; 149 bool _delete(String path) native "Directory_Delete";
149 150
150 var _dirHandler; 151 var _dirHandler;
151 var _fileHandler; 152 var _fileHandler;
152 var _doneHandler; 153 var _doneHandler;
153 var _errorHandler; 154 var _errorHandler;
154 155
155 String _path; 156 String _path;
156 } 157 }
OLDNEW
« no previous file with comments | « runtime/bin/builtin_in.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698