Compare commits

..

No commits in common. "df71c969e3ffc40f092744b476292c5865c61199" and "37d4f34f8b9d7777321aaca7cee1707984e94d88" have entirely different histories.

1 changed files with 4 additions and 14 deletions

View File

@ -1,5 +1,4 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::error::Error;
use std::{env, fs}; use std::{env, fs};
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
@ -21,19 +20,10 @@ fn main() {
let conf : Config = serde_yaml::from_str(&conf_str) let conf : Config = serde_yaml::from_str(&conf_str)
.expect("invalid config format"); .expect("invalid config format");
load_paths(&conf.input_path).unwrap();
}
fn load_paths(root_dir : &str) -> Result<(), Box<dyn Error>> { let input_paths = fs::read_dir(conf.input_path).unwrap();
let entries = fs::read_dir(root_dir)?;
for entry in entries { for path in input_paths {
let entry = entry?; println!("{}", path.unwrap().path().display())
let meta = entry.metadata()?;
if meta.is_file() {
println!("{}", entry.path().display());
}
} }
Ok(())
} }