| 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 /** | 7 /** |
| 8 * FileMode describes the modes in which a file can be opened. | 8 * FileMode describes the modes in which a file can be opened. |
| 9 */ | 9 */ |
| 10 class FileMode { | 10 class FileMode { |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 */ | 448 */ |
| 449 String get path; | 449 String get path; |
| 450 } | 450 } |
| 451 | 451 |
| 452 | 452 |
| 453 class FileIOException implements Exception { | 453 class FileIOException implements Exception { |
| 454 const FileIOException([String this.message = "", | 454 const FileIOException([String this.message = "", |
| 455 OSError this.osError = null]); | 455 OSError this.osError = null]); |
| 456 String toString() { | 456 String toString() { |
| 457 StringBuffer sb = new StringBuffer(); | 457 StringBuffer sb = new StringBuffer(); |
| 458 sb.add("FileIOException"); | 458 sb.write("FileIOException"); |
| 459 if (!message.isEmpty) { | 459 if (!message.isEmpty) { |
| 460 sb.add(": $message"); | 460 sb.write(": $message"); |
| 461 if (osError != null) { | 461 if (osError != null) { |
| 462 sb.add(" ($osError)"); | 462 sb.write(" ($osError)"); |
| 463 } | 463 } |
| 464 } else if (osError != null) { | 464 } else if (osError != null) { |
| 465 sb.add(": osError"); | 465 sb.write(": osError"); |
| 466 } | 466 } |
| 467 return sb.toString(); | 467 return sb.toString(); |
| 468 } | 468 } |
| 469 final String message; | 469 final String message; |
| 470 final OSError osError; | 470 final OSError osError; |
| 471 } | 471 } |
| OLD | NEW |