Skip to main content

write_journal

Function write_journal 

Source
pub fn write_journal(
    path: &Path,
    journal: &Journal,
) -> Result<(), WorktreeCopyError>
Expand description

What: Writes one complete journal atomically: a private exclusive temporary, synced, renamed, and its directory synced. Why: A reader sees either the previous complete journal or the new complete one, never a fragment.

In TS you’d write (pseudocode):

await writeJournal({ path, record });