Abstraction for file system operations Allows different implementations for different platforms (mobile/web) and easy mocking in tests
Platform implementations:
- PlatformFileSystemService: uses dart:io for mobile
- WebFileSystemService: uses IndexedDB/LocalStorage for web
- Implementers
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
-
deleteFile(
String path) → Future< void> - Deletes a file at the given path
-
fileExists(
String path) → Future< bool> - Checks if a file exists at the given path
-
getBundledResourcePath(
String resourceName) → Future< String> - Gets the path to a bundled native resource
-
getFileSize(
String path) → Future< int> - Gets the size of a file in bytes
-
getTargetPath(
String filename) → Future< String> - Gets the target path for storing a model file with given filename
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFile(
String path) → Future< Uint8List> - Reads data from a file at the given path
-
registerExternalFile(
String filename, String externalPath) → Future< void> - Registers an external file path (for FileSource)
-
toString(
) → String -
A string representation of this object.
inherited
-
writeFile(
String path, Uint8List data) → Future< void> - Writes data to a file at the given path
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited