#file #tail #block #end #content #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

#13 in #end

Download history 86/week @ 2023-11-28 34/week @ 2023-12-05 40/week @ 2023-12-12 70/week @ 2023-12-19 21/week @ 2023-12-26 42/week @ 2024-01-02 62/week @ 2024-01-09 71/week @ 2024-01-16 54/week @ 2024-01-23 86/week @ 2024-01-30 41/week @ 2024-02-06 70/week @ 2024-02-13 57/week @ 2024-02-20 70/week @ 2024-02-27 68/week @ 2024-03-05 42/week @ 2024-03-12

261 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