| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class _Directory implements Directory { | 7 class _Directory implements Directory { |
| 8 static const CREATE_REQUEST = 0; | 8 static const CREATE_REQUEST = 0; |
| 9 static const DELETE_REQUEST = 1; | 9 static const DELETE_REQUEST = 1; |
| 10 static const EXISTS_REQUEST = 2; | 10 static const EXISTS_REQUEST = 2; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 if (_directoryService == null) { | 275 if (_directoryService == null) { |
| 276 _directoryService = _newServicePort(); | 276 _directoryService = _newServicePort(); |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 | 279 |
| 280 final String _path; | 280 final String _path; |
| 281 SendPort _directoryService; | 281 SendPort _directoryService; |
| 282 } | 282 } |
| 283 | 283 |
| 284 class _AsyncDirectoryLister { | 284 class _AsyncDirectoryLister { |
| 285 const int LIST_FILE = 0; | 285 static const int LIST_FILE = 0; |
| 286 const int LIST_DIRECTORY = 1; | 286 static const int LIST_DIRECTORY = 1; |
| 287 const int LIST_LINK = 2; | 287 static const int LIST_LINK = 2; |
| 288 const int LIST_ERROR = 3; | 288 static const int LIST_ERROR = 3; |
| 289 const int LIST_DONE = 4; | 289 static const int LIST_DONE = 4; |
| 290 | 290 |
| 291 const int RESPONSE_TYPE = 0; | 291 static const int RESPONSE_TYPE = 0; |
| 292 const int RESPONSE_PATH = 1; | 292 static const int RESPONSE_PATH = 1; |
| 293 const int RESPONSE_COMPLETE = 1; | 293 static const int RESPONSE_COMPLETE = 1; |
| 294 const int RESPONSE_ERROR = 2; | 294 static const int RESPONSE_ERROR = 2; |
| 295 | 295 |
| 296 final String path; | 296 final String path; |
| 297 final bool recursive; | 297 final bool recursive; |
| 298 final bool followLinks; | 298 final bool followLinks; |
| 299 | 299 |
| 300 StreamController controller; | 300 StreamController controller; |
| 301 int id; | 301 int id; |
| 302 bool canceled = false; | 302 bool canceled = false; |
| 303 bool nextRunning = false; | 303 bool nextRunning = false; |
| 304 bool closed = false; | 304 bool closed = false; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 controller.addError( | 405 controller.addError( |
| 406 new DirectoryException("Directory listing failed", | 406 new DirectoryException("Directory listing failed", |
| 407 errorPath, | 407 errorPath, |
| 408 err)); | 408 err)); |
| 409 } else { | 409 } else { |
| 410 controller.addError( | 410 controller.addError( |
| 411 new DirectoryException("Internal error")); | 411 new DirectoryException("Internal error")); |
| 412 } | 412 } |
| 413 } | 413 } |
| 414 } | 414 } |
| OLD | NEW |