LocalStorageDirectory class final

Web build placeholder for the local engine's directory.

The local engine needs synchronous file access, which browsers do not offer on the main thread. A future OPFS backend will implement SyncStorageFile on top of FileSystemSyncAccessHandle inside a worker; until then this throws a clear error instead of failing at an import.

Implemented types

Constructors

LocalStorageDirectory(String path, {bool readOnly = false})
Always throws UnsupportedError.

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

closeSync() → void
Releases resources owned by the directory.
override
deleteSync(String name) → void
Deletes the named file if it exists.
override
existsSync(String name) → bool
Whether a file with that name exists.
override
listSync() → List<String>
Names of all files, sorted.
override
mapSync(String name) → MappedFile
Maps a whole file read-only.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openSync(String name, {bool create = true}) → SyncStorageFile
Opens (and by default creates) the named file.
override
renameSync(String from, String to) → void
Renames from to to, replacing to.
override
toString() → String
A string representation of this object.
inherited

Operators

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