1 use std::{convert::TryFrom, fs::File, path::{Path, PathBuf}};
16 // let matches = cli::get_matches();
17 // match cli::Command::try_from(matches) {
19 // let mut eval = evaluator::Evaluator::new(command);
23 // print!("{}: {}\n", "error".red(), err);
28 // Testing tar unarchival
29 let file = File::open("ouch.tar").unwrap();
30 let mut a = Archive::new(file);
32 for file in a.entries().unwrap() {
33 // Make sure there wasn't an I/O error
34 let mut file = file.unwrap();
36 let path = if let Ok(path) = file.path() {
41 let name = path.to_string_lossy();
43 file.unpack(format!("{}", name)).unwrap();