| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 */ | 92 */ |
| 93 Future<int> length(); | 93 Future<int> length(); |
| 94 | 94 |
| 95 /** | 95 /** |
| 96 * Synchronously get the length of the file. | 96 * Synchronously get the length of the file. |
| 97 */ | 97 */ |
| 98 int lengthSync(); | 98 int lengthSync(); |
| 99 | 99 |
| 100 /** | 100 /** |
| 101 * Get the last-modified time of the file. Returns a | 101 * Get the last-modified time of the file. Returns a |
| 102 * [:Future<Date>:] that completes with a [Date] object for the | 102 * [:Future<DateTime>:] that completes with a [DateTime] object for the |
| 103 * modification date. | 103 * modification date. |
| 104 */ | 104 */ |
| 105 Future<Date> lastModified(); | 105 Future<DateTime> lastModified(); |
| 106 | 106 |
| 107 /** | 107 /** |
| 108 * Get the last-modified time of the file. Throws an exception | 108 * Get the last-modified time of the file. Throws an exception |
| 109 * if the file does not exist. | 109 * if the file does not exist. |
| 110 */ | 110 */ |
| 111 Date lastModifiedSync(); | 111 DateTime lastModifiedSync(); |
| 112 | 112 |
| 113 /** | 113 /** |
| 114 * Open the file for random access operations. Returns a | 114 * Open the file for random access operations. Returns a |
| 115 * [:Future<RandomAccessFile>:] that completes with the opened | 115 * [:Future<RandomAccessFile>:] that completes with the opened |
| 116 * random access file. RandomAccessFiles must be closed using the | 116 * random access file. RandomAccessFiles must be closed using the |
| 117 * [close] method. | 117 * [close] method. |
| 118 * | 118 * |
| 119 * Files can be opened in three modes: | 119 * Files can be opened in three modes: |
| 120 * | 120 * |
| 121 * FileMode.READ: open the file for reading. | 121 * FileMode.READ: open the file for reading. |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 sb.add(" ($osError)"); | 451 sb.add(" ($osError)"); |
| 452 } | 452 } |
| 453 } else if (osError != null) { | 453 } else if (osError != null) { |
| 454 sb.add(": osError"); | 454 sb.add(": osError"); |
| 455 } | 455 } |
| 456 return sb.toString(); | 456 return sb.toString(); |
| 457 } | 457 } |
| 458 final String message; | 458 final String message; |
| 459 final OSError osError; | 459 final OSError osError; |
| 460 } | 460 } |
| OLD | NEW |