FileIONative class

Native platform implementation using dart:io Works on: Windows, macOS, Linux, Android, iOS

Implemented types

Constructors

FileIONative()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeFileHash(String filePath) → Stream<FileHashProgress>
Computes SHA256 hash of a file by reading it in chunks Returns stream updates with progress and a final event containing FileHashProgress.hash
override
fileExists(String filePath) → Future<bool>
Checks if a file exists at the given path
override
getFileSize(String filePath) → Future<int>
Gets the size of a file in bytes
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readFile(String filePath) → Future<Uint8List>
Reads entire file into memory as Uint8List
override
readFileAsStream(String filePath, {int chunkSize = 8192}) → Stream<Uint8List>
Reads a file in chunks and returns a stream of bytes chunkSize determines the size of each chunk (default 8KB)
override
toString() → String
A string representation of this object.
inherited
writeFile(String filePath, Uint8List data) → Future<void>
Writes bytes to a file at the given path Creates the file if it doesn't exist, overwrites if it does
override
writeFileStream(String filePath, Stream<Uint8List> dataStream) → Future<void>
Writes a stream of bytes to a file at the given path Creates the file if it doesn't exist, overwrites if it does
override

Operators

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