Skip to main content

write_full_content

Function write_full_content 

Source
pub fn write_full_content(
    file: ConfigFile,
    content: &str,
    dry_run: bool,
) -> Result<PatchOutcome, ConfigWriteError>
Expand description

What: Atomically replace the entire content of a config file.

Inputs:

  • file: Target ConfigFile.
  • content: Full new content.
  • dry_run: When true, do not modify disk.

Output:

ยงErrors

Details:

  • Used by callers that have already produced a fully serialized buffer (e.g. theme pre-commit validation that writes to a temp path, validates, then commits).