Skip to main content

read_tail

Function read_tail 

Source
pub async fn read_tail(file: &mut File, max: u64) -> Vec<u8> ⓘ
Expand description

The last max bytes of an open file, starting at a line: the first, cut line is dropped (unless the whole file fits). Never reads more than max bytes, whatever the file’s size; empty on any error. It takes the file the caller already opened (seeking it), so a file is opened once.