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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 /** | 87 /** |
88 * Synchronously delete the file. Only a file or a link to a file | 88 * Synchronously delete the file. Only a file or a link to a file |
89 * can be deleted with this method, not a directory or a broken link. | 89 * can be deleted with this method, not a directory or a broken link. |
90 * | 90 * |
91 * Throws a [FileIOException] if the operation fails. | 91 * Throws a [FileIOException] if the operation fails. |
92 */ | 92 */ |
93 void deleteSync(); | 93 void deleteSync(); |
94 | 94 |
95 /** | 95 /** |
96 * Get a [Directory] object for the directory containing this | 96 * Get a [Directory] object for the directory containing this |
97 * file. Returns a [:Future<Directory>:] that completes with the | 97 * file. |
98 * directory. | |
99 */ | 98 */ |
100 Future<Directory> directory(); | 99 Directory get directory; |
101 | |
102 /** | |
103 * Synchronously get a [Directory] object for the directory containing | |
104 * this file. | |
105 * | |
106 * Throws a [FileIOException] if the operation fails. | |
107 */ | |
108 Directory directorySync(); | |
109 | 100 |
110 /** | 101 /** |
111 * Get the length of the file. Returns a [:Future<int>:] that | 102 * Get the length of the file. Returns a [:Future<int>:] that |
112 * completes with the length in bytes. | 103 * completes with the length in bytes. |
113 */ | 104 */ |
114 Future<int> length(); | 105 Future<int> length(); |
115 | 106 |
116 /** | 107 /** |
117 * Synchronously get the length of the file. | 108 * Synchronously get the length of the file. |
118 * | 109 * |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 sb.write(" ($osError)"); | 529 sb.write(" ($osError)"); |
539 } | 530 } |
540 } else if (osError != null) { | 531 } else if (osError != null) { |
541 sb.write(": osError"); | 532 sb.write(": osError"); |
542 } | 533 } |
543 return sb.toString(); | 534 return sb.toString(); |
544 } | 535 } |
545 final String message; | 536 final String message; |
546 final OSError osError; | 537 final OSError osError; |
547 } | 538 } |
OLD | NEW |