#file #tail #block #content #end #found #reached

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

#18 in #end

Download history 55/week @ 2024-03-12 76/week @ 2024-03-19 84/week @ 2024-03-26 69/week @ 2024-04-02 83/week @ 2024-04-09 58/week @ 2024-04-16 68/week @ 2024-04-23 61/week @ 2024-04-30 48/week @ 2024-05-07 54/week @ 2024-05-14 49/week @ 2024-05-21 77/week @ 2024-05-28 61/week @ 2024-06-04 48/week @ 2024-06-11 72/week @ 2024-06-18 42/week @ 2024-06-25

245 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

~170–315KB