Skip to main content

trim_to_complete_records

Function trim_to_complete_records 

Source
fn trim_to_complete_records(path: &Path) -> Result<u64>
Expand description

Cut path back to its last complete (newline-ended) record: a copy of a session file another process is appending to may end mid-record. Returns the kept length. A tail with no newline at all is left as it is; the resumability check that follows judges it.