Snapshot class
Manages the creation of a single snapshot file in a context where multiple async functions could be trying to use and/or create it.
To use:
var s = new Snapshot(...);
if (s.needsSnapshot) { // create s.snapshotFile, then call: s.snapshotCompleted(); } else { await snapshotValid(); // use existing s.snapshotFile; }
Constructors
- Snapshot(Folder snapshotCache, String toolPath, int serial, ResourceProvider resourceProvider)
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- needsSnapshot → bool
-
Will return true precisely once, unless snapshotFile was already a
snapshot. In that case, will always return false.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- snapshotFile → File
-
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
snapshotCompleted(
) → void -
snapshotValid(
) → Future< void> -
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited