IndexedDbFileSystem class final
A file system storing files divided into blocks in an IndexedDB database.
As sqlite3's file system is synchronous and IndexedDB isn't, no guarantees on durability can be made. Instead, file changes are written at some point after the database is changed. However you can wait for changes manually with flush
In the future, we may want to store individual blocks instead.
- Inheritance
-
- Object
- VirtualFileSystem
- BaseVirtualFileSystem
- IndexedDbFileSystem
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether this file system is closing or closed.
no setter
- 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
-
close(
) → Future< void> -
flush(
) → Future< void> - Waits for all pending operations to finish, then completes the future.
-
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
Static Methods
-
databases(
) → Future< List< String> ?> - Returns all IndexedDB database names accessible from the current context.
-
deleteDatabase(
[String dbName = 'sqlite3_databases']) → Future< void> - Deletes an IndexedDB database.
-
open(
{required String dbName, String vfsName = 'indexeddb', Random? random}) → Future< IndexedDbFileSystem> -
Loads an IndexedDB file system identified by the
dbName
.