AbstractFileHandle class abstract
Base class for FileHandle and RamFileHandle. Provides an interface for random access to the data of a file.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
True if the file is currently open.
no setter
- length → int
-
The size of the file in bytes.
no setter
- position ↔ int
-
The current read/write position pf the file.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Close the file asynchronously.
-
closeSync(
) → void - Close the file synchronously.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
{FileAccess mode = FileAccess.read}) → bool -
Open the file with the given
mode, for either read or write. -
readInto(
Uint8List buffer, [int? length]) → int -
Read from the file into the given
buffer. Ifendis omitted, it defaults tobuffer.length. -
toString(
) → String -
A string representation of this object.
inherited
-
writeFromSync(
List< int> buffer, [int start = 0, int? end]) → void -
Synchronously writes from a
bufferto the file. Will read the buffer from indexstartto indexend. Thestartmust be non-negative and no greater thanbuffer.length. Ifendis omitted, it defaults tobuffer.length. Otherwiseendmust be no less thanstartand no greater thanbuffer.length.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited