Initial commit

Still getting Config and argument parsing setup.
This commit is contained in:
Cameron Cordes
2020-04-26 23:18:40 -04:00
commit b73e4d38f1
5 changed files with 185 additions and 0 deletions

31
src/main.rs Normal file
View File

@@ -0,0 +1,31 @@
use std::env;
use std::io;
use std::fs::{self};
use std::path::Path;
mod config;
fn main() {
let config = config::Config::from_args();
println!("{:?}", config);
let path = Path::new(".");
traverse_dir(path);
}
fn parse_args() {
}
fn traverse_dir(dir: &Path) -> io::Result<()> {
for entry in fs::read_dir(dir)? {
let entry = entry?;
let file_type = entry.file_type()?;
if file_type.is_dir() {
traverse_dir(&entry.path());
}
}
Ok(())
}