SnapshotManager class
Creates and restores full project snapshots before aggressive migrations.
Snapshots are stored in .migrator_snapshots/<timestamp>/ and include
all .dart, pubspec.yaml, and pubspec.lock files. A JSON manifest
records the file inventory for reliable rollback.
Constructors
- SnapshotManager(String projectPath)
-
Creates a SnapshotManager for the project at
projectPath.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- projectPath → String
-
Absolute path to the project root.
Absolute path to the project root.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createSnapshot(
) → Future< String> -
Copies every
.dartandpubspec.yamlfile under projectPath into a timestamped snapshot directory and writes a manifest for rollback. Returns the path of the created snapshot directory. -
listSnapshots(
) → List< Map< String, dynamic> > - Returns metadata for every available snapshot, newest first.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rollback(
{String? snapshotPath}) → Future< void> - Restores the project from the latest (or a specific) snapshot.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited