fs-tail

Crates.iofs-tail
lib.rsfs-tail
version0.1.4
sourcesrc
created_at2020-12-17 18:11:57.580302
updated_at2020-12-27 08:26:32.345347
descriptiontail a file and block when end of file is reached. When new contents are found in the file, the loop will continue
homepage
repositoryhttps://github.com/avnerbarr/fs-tail
max_upload_size
id323979
size7,412
Avner (avnerbarr)

documentation

README

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);
    }
}
Commit count: 14

cargo fmt