PersistentFileAccessSet class final

A transactional, persistent set of user-authorized files and directories.

Filesystem access is active only inside withAccess callbacks. Temporarily unavailable handles stay persisted and are retried by reload. Handles are removed automatically only when the backend classifies them as permanently invalid.

Properties

backend PersistentAccessBackend
final
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
no setter
isEmpty bool
no setter
isNotEmpty bool
no setter
key String
final
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot PersistentAccessSnapshot
The latest immutable recovery view.
no setter
snapshots Stream<PersistentAccessSnapshot>
Snapshots accepted after this instance was opened.
no setter

Methods

add(FileSystemEntity entity) Future<bool>
Adds entity, returning whether membership or availability changed.
addDetailed(FileSystemEntity entity) Future<PersistentFileAccessAddResult>
Adds entity and reports whether it was inserted, replaced an existing identity, recovered an unchanged handle, or was already present.
close() Future<void>
Permanently closes this instance and its snapshot stream.
contains(FileSystemEntity entity) bool
Whether an available entry has the same backend identity and kind as entity.
containsId(String id) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload({bool revalidateAvailable = false}) Future<PersistentAccessSnapshot>
Reloads authoritative storage and retries temporarily unavailable entries.
remove(FileSystemEntity entity) Future<bool>
Removes the available item matching entity's backend identity and kind.
removeById(String id) Future<bool>
Removes an entry by the one-way identifier exposed in a snapshot.
removeEntry(PersistentAccessEntry entry) Future<bool>
Removes entry by its public identifier, including when it is unavailable.
retryById(String id) Future<PersistentAccessEntry?>
Retries recovery of one public entry identifier.
retryEntry(PersistentAccessEntry entry) Future<PersistentAccessEntry?>
Retries recovery of entry without retrying every unavailable entry.
toString() String
A string representation of this object.
inherited
withAccess<T>(PersistentAccessEntry entry, FutureOr<T> operation(FileSystemEntity entity)) Future<T>
Runs operation with temporary platform access to entry.
withAccessById<T>(String id, FutureOr<T> operation(FileSystemEntity entity)) Future<T>
Runs operation with temporary platform access to the entry named by id.

Operators

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

Static Methods

open(String key, {PersistentAccessBackend? backend, PersistentSetStorage? storage, PersistentAccessIssueHandler? onIssue}) Future<PersistentFileAccessSet>
Opens or creates the collection stored at key.