Crate fileinput [] [src]

Read from multiple input streams.

A FileInput implements the std::io::Read trait and reads the contents of each file specified (- means standard input), or standard input if none are given.

An example that prints out all the lines in each of the two files specified:

use std::io::{BufRead,BufReader};
use fileinput::FileInput;

let filenames = vec!["testdata/1", "testdata/2"];
let fileinput = FileInput::new(&filenames);
let mut reader = BufReader::new(fileinput);

for line in reader.lines() {
    println!("{}", line.unwrap());
}

Structs

FileInput

A wrapper which reads from multiple streams.

Enums

Source

A file source.