Crates.io | fs-tail |
lib.rs | fs-tail |
version | 0.1.4 |
source | src |
created_at | 2020-12-17 18:11:57.580302 |
updated_at | 2020-12-27 08:26:32.345347 |
description | tail a file and block when end of file is reached. When new contents are found in the file, the loop will continue |
homepage | |
repository | https://github.com/avnerbarr/fs-tail |
max_upload_size | |
id | 323979 |
size | 7,412 |
tail a file and block until more lines are added.
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);
}
}