FileHandle class
- Inheritance
-
- Object
- AbstractFileHandle
- FileHandle
Constructors
- FileHandle(String path, {FileAccess mode = FileAccess.read})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
True if the file is currently open.
no setteroverride
- length → int
-
The size of the file in bytes.
no setteroverride
- path → String
-
no setter
- position ↔ int
-
The current read/write position pf the file.
getter/setter pairoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Close the file asynchronously.
override
-
closeSync(
) → void -
Close the file synchronously.
override
-
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.override -
readInto(
Uint8List buffer, [int? end]) → int -
Read from the file into the given
buffer
. Ifend
is omitted, it defaults tobuffer
.length.override -
toString(
) → String -
A string representation of this object.
inherited
-
writeFromSync(
List< int> buffer, [int start = 0, int? end]) → void -
Synchronously writes from a
buffer
to the file. Will read the buffer from indexstart
to indexend
. Thestart
must be non-negative and no greater thanbuffer
.length. Ifend
is omitted, it defaults tobuffer
.length. Otherwiseend
must be no less thanstart
and no greater thanbuffer
.length.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited