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 DirectoryException { | 6 class DirectoryException { |
7 const DirectoryException(String this.message); | 7 const DirectoryException(String this.message); |
8 final String message; | 8 final String message; |
9 } | 9 } |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 message['dirHandler'], | 21 message['dirHandler'], |
22 message['fileHandler'], | 22 message['fileHandler'], |
23 message['doneHandler'], | 23 message['doneHandler'], |
24 message['dirErrorHandler']); | 24 message['dirErrorHandler']); |
25 }); | 25 }); |
26 } | 26 } |
27 | 27 |
28 void _list(String dir, | 28 void _list(String dir, |
29 int id, | 29 int id, |
30 bool recursive, | 30 bool recursive, |
31 ReceivePort dirHandler, | 31 SendPort dirHandler, |
32 ReceivePort fileHandler, | 32 SendPort fileHandler, |
33 ReceivePort doneHandler, | 33 SendPort doneHandler, |
34 ReceivePort dirErrorHandler) native "Directory_List"; | 34 SendPort dirErrorHandler) native "Directory_List"; |
35 } | 35 } |
36 | 36 |
37 | 37 |
38 class _Directory implements Directory { | 38 class _Directory implements Directory { |
39 | 39 |
40 _Directory.open(String this._dir) { | 40 _Directory.open(String this._dir) { |
41 _id = 0; | 41 _id = 0; |
42 _closed = false; | 42 _closed = false; |
43 _listing = false; | 43 _listing = false; |
44 if (!_open(_dir)) { | 44 if (!_open(_dir)) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 ReceivePort _dirHandler; | 148 ReceivePort _dirHandler; |
149 ReceivePort _fileHandler; | 149 ReceivePort _fileHandler; |
150 ReceivePort _doneHandler; | 150 ReceivePort _doneHandler; |
151 ReceivePort _dirErrorHandler; | 151 ReceivePort _dirErrorHandler; |
152 | 152 |
153 String _dir; | 153 String _dir; |
154 int _id; | 154 int _id; |
155 bool _closed; | 155 bool _closed; |
156 bool _listing; | 156 bool _listing; |
157 } | 157 } |
OLD | NEW |