Skip to main content

tail_file

Function tail_file 

Source
pub fn tail_file(
    filename: &str,
    config: &TailConfig,
    out: &mut impl Write,
    tool_name: &str,
) -> Result<bool>
Expand description

Process a single file/stdin for tail.

On Linux, the sendfile fast paths bypass out and write directly to stdout (fd 1). Callers MUST ensure out wraps stdout when these paths are active. The out.flush() call drains any buffered data before sendfile takes over.