use std::fs::File;
use std::prelude::v1::*;
use std::io::prelude::*;
use std::io;
use std::path::{PathBuf, Path};
pub fn read<P: AsRef<Path>>(file_path: P) -> Result<String, io::Error> {
let mut file = File::open(file_path)?;
let mut content = String::new();
file.read_to_string(&mut content)?;
Ok(content)
}
pub fn resolve<T: AsRef<Path>, P: AsRef<Path>>(root: T, relative: P) -> PathBuf {
root.as_ref().join(relative)
}