| 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; |
| 11 static const CREATE_TEMP_REQUEST = 3; | 11 static const CREATE_TEMP_REQUEST = 3; |
| 12 static const LIST_REQUEST = 4; | 12 static const LIST_REQUEST = 4; |
| 13 static const RENAME_REQUEST = 5; | 13 static const RENAME_REQUEST = 5; |
| 14 | 14 |
| 15 static const SUCCESS_RESPONSE = 0; | |
| 16 static const ILLEGAL_ARGUMENT_RESPONSE = 1; | |
| 17 static const OSERROR_RESPONSE = 2; | |
| 18 | |
| 19 _Directory(String this._path); | 15 _Directory(String this._path); |
| 20 _Directory.fromPath(Path path) : this(path.toNativePath()); | 16 _Directory.fromPath(Path path) : this(path.toNativePath()); |
| 21 | 17 |
| 22 external static String _current(); | 18 external static String _current(); |
| 23 external static _setCurrent(path); | 19 external static _setCurrent(path); |
| 24 external static _createTemp(String template); | 20 external static _createTemp(String template); |
| 25 external static int _exists(String path); | 21 external static int _exists(String path); |
| 26 external static _create(String path); | 22 external static _create(String path); |
| 27 external static _delete(String path, bool recursive); | 23 external static _delete(String path, bool recursive); |
| 28 external static _rename(String path, String newPath); | 24 external static _rename(String path, String newPath); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 331 |
| 336 void _ensureDirectoryService() { | 332 void _ensureDirectoryService() { |
| 337 if (_directoryService == null) { | 333 if (_directoryService == null) { |
| 338 _directoryService = _newServicePort(); | 334 _directoryService = _newServicePort(); |
| 339 } | 335 } |
| 340 } | 336 } |
| 341 | 337 |
| 342 final String _path; | 338 final String _path; |
| 343 SendPort _directoryService; | 339 SendPort _directoryService; |
| 344 } | 340 } |
| OLD | NEW |