Skip to main content

write_bundle_atomically

Function write_bundle_atomically 

Source
pub fn write_bundle_atomically(
    path: &Path,
    bundle: &str,
) -> Result<(), PortError>
Expand description

Same-directory durable replacement, so a failed export leaves either the previous complete bundle or the next complete bundle, never half a JSONL stream. Unix rename replaces atomically; Windows keeps the previous file beside it until the new one has taken the canonical name.