Skip to main content

write_file_atomic

Function write_file_atomic 

Source
pub async fn write_file_atomic(
    path: &Path,
    content: &str,
    force: bool,
) -> Result<WriteOutcome, Error>
Expand description

Write content to path, creating parent directories as needed.

When the file already exists and force is false, returns WriteOutcome::Skipped without modifying the file.