pub async fn follow<W>(
path: &Path,
limit: Duration,
out: &mut W,
) -> Result<(), Error>where
W: AsyncWrite + Unpin,Expand description
Writes the contents of the file at path to out as they are written, until limit passes.
Waits for the file to exist, then writes it from the start. Reaching limit after the file was found is the
normal end. A file that is truncated, renamed or replaced is not followed again.
ยงErrors
Fails with Error::TimedOut when the file does not appear before limit passes, Error::Target when it
cannot be opened or read, and Error::Output when writing to out fails.