Skip to main content

last_record

Function last_record 

Source
fn last_record(path: &Path, complete_only: bool) -> Result<(u64, Vec<u8>)>
Expand description

path’s last record and the offset where it ends. With complete_only that is the last newline-ended record, so a record still being written is passed over; a file with no newline at all is one record either way, left to the parse to judge. Reads the file’s end, widening the window until it holds the whole record, however large (a big tool result).