Minimal file abstraction used by the write-ahead log.
Deliberately narrow: the log needs append, positional read, truncate and flush, nothing else. Segments and manifests will use different interfaces, because an append log and an immutable object have different failure modes.
Implementations must guarantee that readAt returns exactly length bytes (throwing otherwise) and that truncate never extends the file.
- Implementers
Properties
Methods
-
append(
Uint8List bytes) → Future< void> -
Appends
bytesat the end of the file. -
close(
) → Future< void> - Releases the file. Subsequent operations throw StateError.
-
flush(
) → Future< void> - Makes previously appended bytes durable.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readAt(
int offset, int length) → Future< Uint8List> -
Reads exactly
lengthbytes starting atoffset. -
toString(
) → String -
A string representation of this object.
inherited
-
truncate(
int length) → Future< void> -
Cuts the file to
lengthbytes. Must not extend.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited