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
Properties
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.
nullrecords that the optional path did not exist. -
contains(
String path) → bool -
createDirectory(
String path) → void -
Creates
pathand 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
priorityPathsfirst, 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
pathbefore 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