This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf-rs/src/input.rs

14 lines
389 B
Rust
Raw Normal View History

2017-07-20 09:14:48 +01:00
use std::fs::File;
use std::io::Read;
use std::path::PathBuf;
pub fn read_input_files(files: Vec<PathBuf>) -> String {
let mut input = String::new();
for input_file_path in files.iter() {
let mut input_file = File::open(input_file_path).expect("Unable to open file");
input_file.read_to_string(&mut input).expect("Failed to read file");
}
return input;
}