| 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 interface File factory _File { | 5 interface File factory _File { |
| 6 /** | 6 /** |
| 7 * Create a File object. | 7 * Create a File object. |
| 8 */ | 8 */ |
| 9 File(String name); | 9 File(String name); |
| 10 | 10 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 */ | 214 */ |
| 215 void truncateSync(int length); | 215 void truncateSync(int length); |
| 216 | 216 |
| 217 /** | 217 /** |
| 218 * Get the length of the file. When the operation completes the | 218 * Get the length of the file. When the operation completes the |
| 219 * [lengthHandler] is called with the length. | 219 * [lengthHandler] is called with the length. |
| 220 */ | 220 */ |
| 221 void length(); | 221 void length(); |
| 222 | 222 |
| 223 /** | 223 /** |
| 224 * Get the length of the file. When the operation completes the | 224 * Synchronously get the length of the file. |
| 225 * [lengthHandler] is called with the length. | |
| 226 */ | 225 */ |
| 227 int lengthSync(); | 226 int lengthSync(); |
| 228 | 227 |
| 229 /** | 228 /** |
| 230 * Flush the contents of the file to disk. The [flushHandler] is | 229 * Flush the contents of the file to disk. The [flushHandler] is |
| 231 * called when the flush operation completes. | 230 * called when the flush operation completes. |
| 232 */ | 231 */ |
| 233 void flush(); | 232 void flush(); |
| 234 | 233 |
| 235 /** | 234 /** |
| (...skipping 26 matching lines...) Expand all Loading... |
| 262 | 261 |
| 263 interface FileOutputStream extends OutputStream { | 262 interface FileOutputStream extends OutputStream { |
| 264 } | 263 } |
| 265 | 264 |
| 266 | 265 |
| 267 class FileIOException implements Exception { | 266 class FileIOException implements Exception { |
| 268 const FileIOException([String this.message = ""]); | 267 const FileIOException([String this.message = ""]); |
| 269 String toString() => "FileIOException: $message"; | 268 String toString() => "FileIOException: $message"; |
| 270 final String message; | 269 final String message; |
| 271 } | 270 } |
| OLD | NEW |