RamFileHandle class

Inheritance

Constructors

RamFileHandle.asWritableRamBuffer()
Creates a writeable RamFileHandle
factory
RamFileHandle.fromRamFileData(RamFileData ramFileData)
Creates a read-only RamFileHandle from a RamFileData
factory

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
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.
inherited
readInto(Uint8List buffer, [int? end]) int
Read from the file into the given buffer. If end is omitted, it defaults to buffer.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 index start to index end. The start must be non-negative and no greater than buffer.length. If end is omitted, it defaults to buffer.length. Otherwise end must be no less than start and no greater than buffer.length.
override

Operators

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

Static Methods

fromStream(Stream<Uint8List> stream, int fileLength) Future<RamFileHandle>
Creates a read-only RamFileHandle from a stream