| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 16 matching lines...) Expand all Loading... |
| 27 * link, except for File.delete and File.deleteSync, which operate on | 27 * link, except for File.delete and File.deleteSync, which operate on |
| 28 * the link. | 28 * the link. |
| 29 * | 29 * |
| 30 * To operate on the underlying file data there are two options: | 30 * To operate on the underlying file data there are two options: |
| 31 * | 31 * |
| 32 * * Use streaming: read the contents of the file from the [Stream] | 32 * * Use streaming: read the contents of the file from the [Stream] |
| 33 * this.[openRead]() and write to the file by writing to the [IOSink] | 33 * this.[openRead]() and write to the file by writing to the [IOSink] |
| 34 * this.[openWrite](). | 34 * this.[openWrite](). |
| 35 * * Open the file for random access operations using [open]. | 35 * * Open the file for random access operations using [open]. |
| 36 */ | 36 */ |
| 37 abstract class File extends FileSystemEntity { | 37 abstract class File implements FileSystemEntity { |
| 38 /** | 38 /** |
| 39 * Create a File object. | 39 * Create a File object. |
| 40 */ | 40 */ |
| 41 factory File(String path) => new _File(path); | 41 factory File(String path) => new _File(path); |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Create a File object from a Path object. | 44 * Create a File object from a Path object. |
| 45 */ | 45 */ |
| 46 factory File.fromPath(Path path) => new _File.fromPath(path); | 46 factory File.fromPath(Path path) => new _File.fromPath(path); |
| 47 | 47 |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 sb.write(" ($osError)"); | 516 sb.write(" ($osError)"); |
| 517 } | 517 } |
| 518 } else if (osError != null) { | 518 } else if (osError != null) { |
| 519 sb.write(": osError"); | 519 sb.write(": osError"); |
| 520 } | 520 } |
| 521 return sb.toString(); | 521 return sb.toString(); |
| 522 } | 522 } |
| 523 final String message; | 523 final String message; |
| 524 final OSError osError; | 524 final OSError osError; |
| 525 } | 525 } |
| OLD | NEW |