FileMutationJournal class final

Records original file contents so a temporary runner patch can be restored.

A null value represents a path that did not exist before the patch.

Constructors

FileMutationJournal()

Properties

hashCode → int
The hash code for this object.
no setterinherited
paths → Iterable<String>
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

capture(String path, {bool optional = false}) → String?
captureValidatedContents(String path, String? contents) → void
Records contents already read by validation without opening the file again. null records that the optional path did not exist.
contains(String path) → bool
createDirectory(String path) → void
Creates path and records every directory this call had to create.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
original(String path) → String?
preserve(String path, String contents) → void
Preserves an intentional generated upgrade after the temporary run.
restore(String path) → void
restoreAll(Iterable<String> priorityPaths) → void
Restores priorityPaths first, then any remaining captured paths.
rewriteIfChanged(File file, String rewrite(String content)) → void
toString() → String
A string representation of this object.
inherited
write(String path, String contents, {bool optional = false}) → void
Captures path before replacing it, or records it as new when absent.
writeValidated(String path, String contents, {required String? originalContents}) → void
Replaces a file using content already read by validation or generation. This avoids reopening the file solely to populate the rollback journal.

Operators

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