FileByteSink class final

A ByteSink that appends to a file on disk (dart:io; VM/Flutter-native only). Writes are serialized internally, so sequential add calls need not be awaited individually, though awaiting bounds memory.

Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
Total bytes written so far.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Uint8List bytes) Future<void>
Appends bytes to the sink.
override
close() Future<void>
Flushes and releases any resources. Idempotent.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create(String path) Future<FileByteSink>
Opens (creating/truncating) path for writing.