InMemoryFileSystem class final

A virtual file system implementation that stores all files in memory.

This file system is commonly used on the web as a buffer in front of asynchronous storage APIs like IndexedDb. It can also serve as an example on how to write custom file systems to be used with sqlite3.

Inheritance

Constructors

InMemoryFileSystem({String name = 'dart-memory', Random? random})

Properties

fileData Map<String, Uint8Buffer?>
final
hashCode int
The hash code for this object.
no setterinherited
name String
The name of this virtual file system.
finalinherited
random Random
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
xAccess(String path, int flags) int
Check whether a file can be accessed.
override
xCurrentTime() DateTime
Returns the current time.
inherited
xDelete(String path, int syncDir) → void
Delete a file.
override
xFullPathName(String path) String
Resolves a path name supplied by the user into a path that can be used by the other methods of this VFS.
override
xOpen(Sqlite3Filename path, int flags) XOpenResult
Opens a file, returning supported flags and a file instance.
override
xRandomness(Uint8List target) → void
Fill the target with random bytes.
inherited
xSleep(Duration duration) → void
Sleeps for the passed duration.
override

Operators

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