| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /** | 6 /** |
| 7 * FileMode describes the modes in which a file can be opened. | 7 * FileMode describes the modes in which a file can be opened. |
| 8 */ | 8 */ |
| 9 class FileMode { | 9 class FileMode { |
| 10 static final READ = const FileMode(0); | 10 static final READ = const FileMode(0); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 * | 99 * |
| 100 * FileMode.APPEND: same as FileMode.WRITE except that the file is | 100 * FileMode.APPEND: same as FileMode.WRITE except that the file is |
| 101 * not truncated. | 101 * not truncated. |
| 102 * | 102 * |
| 103 * By default mode is FileMode.READ. | 103 * By default mode is FileMode.READ. |
| 104 */ | 104 */ |
| 105 RandomAccessFile openSync([FileMode mode]); | 105 RandomAccessFile openSync([FileMode mode]); |
| 106 | 106 |
| 107 /** | 107 /** |
| 108 * Get the canonical full path corresponding to the file name. The | 108 * Get the canonical full path corresponding to the file name. The |
| 109 * [fullPathHandler] is called when the fullPath operation | 109 * [fullPathHandler] is called with the result when the fullPath |
| 110 * completes. | 110 * operation completes. |
| 111 */ | 111 */ |
| 112 String fullPath(); | 112 void fullPath(); |
| 113 | 113 |
| 114 /** | 114 /** |
| 115 * Synchronously get the canonical full path corresponding to the file name. | 115 * Synchronously get the canonical full path corresponding to the file name. |
| 116 */ | 116 */ |
| 117 String fullPathSync(); | 117 String fullPathSync(); |
| 118 | 118 |
| 119 /** | 119 /** |
| 120 * Create a new independent input stream for the file. The file | 120 * Create a new independent input stream for the file. The file |
| 121 * input stream must be closed when no longer used to free up | 121 * input stream must be closed when no longer used to free up |
| 122 * system resources. | 122 * system resources. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 void set flushHandler(void handler()); | 293 void set flushHandler(void handler()); |
| 294 void set errorHandler(void handler(String error)); | 294 void set errorHandler(void handler(String error)); |
| 295 } | 295 } |
| 296 | 296 |
| 297 | 297 |
| 298 class FileIOException implements Exception { | 298 class FileIOException implements Exception { |
| 299 const FileIOException([String this.message = ""]); | 299 const FileIOException([String this.message = ""]); |
| 300 String toString() => "FileIOException: $message"; | 300 String toString() => "FileIOException: $message"; |
| 301 final String message; | 301 final String message; |
| 302 } | 302 } |
| OLD | NEW |