| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |