| 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; | 15 static const SUCCESS_RESPONSE = 0; |
| 16 static const ILLEGAL_ARGUMENT_RESPONSE = 1; | 16 static const ILLEGAL_ARGUMENT_RESPONSE = 1; |
| 17 static const OSERROR_RESPONSE = 2; | 17 static const OSERROR_RESPONSE = 2; |
| 18 | 18 |
| 19 _Directory(String this._path); | 19 _Directory(String this._path); |
| 20 _Directory.fromPath(Path path) : this(path.toNativePath()); | 20 _Directory.fromPath(Path path) : this(path.toNativePath()); |
| 21 | 21 |
| 22 external static String _current(); | 22 external static String _current(); |
| 23 external static _setCurrent(String path); | 23 external static _setCurrent(path); |
| 24 external static _createTemp(String template); | 24 external static _createTemp(String template); |
| 25 external static int _exists(String path); | 25 external static int _exists(String path); |
| 26 external static _create(String path); | 26 external static _create(String path); |
| 27 external static _delete(String path, bool recursive); | 27 external static _delete(String path, bool recursive); |
| 28 external static _rename(String path, String newPath); | 28 external static _rename(String path, String newPath); |
| 29 external static List _list(String path, bool recursive, bool followLinks); | 29 external static List _list(String path, bool recursive, bool followLinks); |
| 30 external static SendPort _newServicePort(); | 30 external static SendPort _newServicePort(); |
| 31 | 31 |
| 32 static Directory get current => new _Directory(_current()); | 32 static Directory get current => new _Directory(_current()); |
| 33 | 33 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 void _ensureDirectoryService() { | 336 void _ensureDirectoryService() { |
| 337 if (_directoryService == null) { | 337 if (_directoryService == null) { |
| 338 _directoryService = _newServicePort(); | 338 _directoryService = _newServicePort(); |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 | 341 |
| 342 final String _path; | 342 final String _path; |
| 343 SendPort _directoryService; | 343 SendPort _directoryService; |
| 344 } | 344 } |
| OLD | NEW |