pub fn handle_fs_err<P: AsRef<Path>>(path: &[P], err: Error) -> Error
147 148 149 150 151 152
pub fn handle_fs_res<T, P: AsRef<Path>>(path: &[P], res: std::io::Result<T>) -> Result<T> { match res { Ok(t) => Ok(t), Err(e) => Err(handle_fs_err(path, e)), } }