Skip to main content

write

Function write 

Source
pub fn write(project_root: &Path, content: &str) -> Result<()>
Expand description

Write bynk.schema.lock to project_root, atomically (temp file + sync_all + rename + best-effort directory fsync, so a crash mid-write can only leave the intact old file or the intact new one — ledger.rs’s own discipline). A no-op when content is byte-identical to what is already on disk, so a clean rebuild never touches the file’s mtime or produces a spurious git diff.