File class

Constructors

File.new(Client client, FileHandle handle)

Properties

client → Client
final
handle FileHandle
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes the file.
flush() Future<void>
Flushes any pending writes to the file.
getLength() Future<int>
Returns the length of the file in bytes
getProgress() Future<int>
Returns the sync progress of this file, that is, the total byte size of all the blocks of this file that's already been downloaded.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(int offset, int size) Future<List<int>>
Reads size bytes from the file starting at offset bytes from the beginning of the file.
toString() String
A string representation of this object.
override
truncate(int len) Future<void>
Truncates the file to the given length.
write(int offset, List<int> data) Future<void>
Writes the data to the file at the given offset.

Operators

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