| 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 | 5 |
| 6 class _Directory implements Directory { | 6 class _Directory implements Directory { |
| 7 static final CREATE_REQUEST = 0; | 7 static const CREATE_REQUEST = 0; |
| 8 static final DELETE_REQUEST = 1; | 8 static const DELETE_REQUEST = 1; |
| 9 static final EXISTS_REQUEST = 2; | 9 static const EXISTS_REQUEST = 2; |
| 10 static final CREATE_TEMP_REQUEST = 3; | 10 static const CREATE_TEMP_REQUEST = 3; |
| 11 static final LIST_REQUEST = 4; | 11 static const LIST_REQUEST = 4; |
| 12 static final RENAME_REQUEST = 5; | 12 static const RENAME_REQUEST = 5; |
| 13 | 13 |
| 14 static final SUCCESS_RESPONSE = 0; | 14 static const SUCCESS_RESPONSE = 0; |
| 15 static final ILLEGAL_ARGUMENT_RESPONSE = 1; | 15 static const ILLEGAL_ARGUMENT_RESPONSE = 1; |
| 16 static final OSERROR_RESPONSE = 2; | 16 static const OSERROR_RESPONSE = 2; |
| 17 | 17 |
| 18 _Directory(String this._path); | 18 _Directory(String this._path); |
| 19 _Directory.fromPath(Path path) : this(path.toNativePath()); | 19 _Directory.fromPath(Path path) : this(path.toNativePath()); |
| 20 _Directory.current() : this(_current()); | 20 _Directory.current() : this(_current()); |
| 21 | 21 |
| 22 static String _current() native "Directory_Current"; | 22 static String _current() native "Directory_Current"; |
| 23 static _createTemp(String template) native "Directory_CreateTemp"; | 23 static _createTemp(String template) native "Directory_CreateTemp"; |
| 24 static int _exists(String path) native "Directory_Exists"; | 24 static int _exists(String path) native "Directory_Exists"; |
| 25 static _create(String path) native "Directory_Create"; | 25 static _create(String path) native "Directory_Create"; |
| 26 static _delete(String path, bool recursive) native "Directory_Delete"; | 26 static _delete(String path, bool recursive) native "Directory_Delete"; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 } else { | 285 } else { |
| 286 throw e; | 286 throw e; |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 Function _onDir; | 290 Function _onDir; |
| 291 Function _onFile; | 291 Function _onFile; |
| 292 Function _onDone; | 292 Function _onDone; |
| 293 Function _onError; | 293 Function _onError; |
| 294 } | 294 } |
| OLD | NEW |