**Describe the bug** Applying a DartFix to a `customPath` does not save the file. Reading the file later with `File(path).readAsStringSync()` ignores any fixes applied using `addXFileEdit` until `customPath` is saved. All unsaved changes are ignored when reading file contents. **To Reproduce** ```dart class SomeFix extends DartFix { @override void run( CustomLintResolver resolver, ChangeReporter reporter, CustomLintContext context, AnalysisError analysisError, List<AnalysisError> others, ) { context.registry.addNode((node) { final file = File('${Directory.current.path}/lib/foo.txt'); final fileContents = file.readAsStringSync(); if (fileContents == '') { reporter .createChangeBuilder( message: 'Fill empty file', priority: 0, ) .addGenericFileEdit( (builder) => builder.addSimpleInsertion(0, 'foo'), customPath: file.path, ); } }); } } ``` **Expected behavior** Applying `SomeFix` should only be possible once. After `foo` is added to the file, the ChangeBuilder shouldn't get created. I noticed that the analyzer plugin [gets file contents](https://github.com/dart-lang/sdk/blob/main/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart#L222-L224) from ResourceProvider, but I don't see how to access that. There must be a more reliable way to read the file contents than `File(path).readAsStringSync()`, or there must be a way to save the `customPath` file.