Spec-Zone.ru › Dart 2

dart:io

open abstract method

Future<RandomAccessFile> open(
  1. {FileMode mode = FileMode.read}
)

Opens the file for random access operations.

Returns a Future<RandomAccessFile> that completes with the opened random access file. RandomAccessFiles must be closed using the RandomAccessFile.close method.

Files can be opened in three modes:

  • FileMode.read: open the file for reading.

  • FileMode.write: open the file for both reading and writing and truncate the file to length zero. If the file does not exist the file is created.

  • FileMode.append: same as FileMode.write except that the file is not truncated.

Throws a FileSystemException if the operation fails.

Implementation

Future<RandomAccessFile> open({FileMode mode = FileMode.read});

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-io/File/open.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API