pub fn write_chunk_file_append_only(path: &Path, content: &str) -> Result<bool>Expand description
Writes or appends a single .ctbnodes chunk file using strictly append-only semantics:
- If
pathalready exists and equalscontent, does not open the file for writing (Ok(false)). - If
pathalready exists and is a strict byte prefix ofcontent, openspathwithO_WRONLY | O_APPEND(compatible with kernelchattr +a) and writes only the newly appended tail. - If
pathalready exists and is NOT a strict byte prefix ofcontent, fails loudly (Err). - If
pathdoes not exist yet, creates it withO_WRONLY | O_CREAT | O_EXCL.