#block #tail #file

fs-tail

tail a file and block when end of file is reached. When new contents are found in the file, the loop will continue

5 releases

0.1.4 Dec 27, 2020
0.1.3 Dec 21, 2020
0.1.2 Dec 17, 2020
0.1.1 Dec 17, 2020
0.1.0 Dec 17, 2020

#41 in #tail

Download history 99/week @ 2024-07-21 93/week @ 2024-07-28 47/week @ 2024-08-04 29/week @ 2024-08-11 25/week @ 2024-08-18 39/week @ 2024-08-25 47/week @ 2024-09-01 65/week @ 2024-09-08 112/week @ 2024-09-15 99/week @ 2024-09-22 70/week @ 2024-09-29 87/week @ 2024-10-06 116/week @ 2024-10-13 84/week @ 2024-10-20 96/week @ 2024-10-27 86/week @ 2024-11-03

389 downloads per month

MIT license

8KB
156 lines

fs-tail

tail a file and block until more lines are added.

usage

let file = std::fs::File::open("/path/to/some/file").unwrap();
let file = TailedFile::new(file);
let locked = file.lock();
for line in locked.lines() {
    if let Ok(line) = line {
        println!("{}", line);
    }
}

Dependencies

~110–250KB