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 27 matching lines...) Expand all Loading... |
38 * link, except for File.delete and File.deleteSync, which operate on | 38 * link, except for File.delete and File.deleteSync, which operate on |
39 * the link. | 39 * the link. |
40 * | 40 * |
41 * To operate on the underlying file data there are two options: | 41 * To operate on the underlying file data there are two options: |
42 * | 42 * |
43 * * Use streaming: read the contents of the file from the [Stream] | 43 * * Use streaming: read the contents of the file from the [Stream] |
44 * this.[openRead]() and write to the file by writing to the [IOSink] | 44 * this.[openRead]() and write to the file by writing to the [IOSink] |
45 * this.[openWrite](). | 45 * this.[openWrite](). |
46 * * Open the file for random access operations using [open]. | 46 * * Open the file for random access operations using [open]. |
47 */ | 47 */ |
48 abstract class File implements FileSystemEntity { | 48 abstract class File extends FileSystemEntity { |
49 /** | 49 /** |
50 * Create a File object. | 50 * Create a File object. |
51 */ | 51 */ |
52 factory File(String path) => new _File(path); | 52 factory File(String path) => new _File(path); |
53 | 53 |
54 /** | 54 /** |
55 * Create a File object from a URI. | 55 * Create a File object from a URI. |
56 * | 56 * |
57 * If [uri] cannot reference a file this throws [UnsupportedError]. | 57 * If [uri] cannot reference a file this throws [UnsupportedError]. |
58 */ | 58 */ |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 sb.write(": $osError"); | 606 sb.write(": $osError"); |
607 if (path != null) { | 607 if (path != null) { |
608 sb.write(", path = '$path'"); | 608 sb.write(", path = '$path'"); |
609 } | 609 } |
610 } else if (path != null) { | 610 } else if (path != null) { |
611 sb.write(": $path"); | 611 sb.write(": $path"); |
612 } | 612 } |
613 return sb.toString(); | 613 return sb.toString(); |
614 } | 614 } |
615 } | 615 } |
OLD | NEW |