diff --git a/fs-index/src/index.rs b/fs-index/src/index.rs index 98bcafb8..378e10cb 100644 --- a/fs-index/src/index.rs +++ b/fs-index/src/index.rs @@ -274,18 +274,41 @@ impl ResourceIndex { pub fn build>(root_path: P) -> Result { log::debug!("Building index at root path: {:?}", root_path.as_ref()); + // Print all files in the root path + for entry in fs::read_dir(root_path.as_ref())? { + let entry = entry?; + let path = entry.path(); + printl!("Found file: {:?}", path); + } + let root_path = root_path.as_ref(); // Canonicalize the root path let root_path = root_path.canonicalize()?; + // Print all files in the root path + for entry in fs::read_dir(&root_path)? { + let entry = entry?; + let path = entry.path(); + printl!("Found file: {:?}", path); + } + let mut id_to_paths: HashMap> = HashMap::new(); let mut path_to_resource = HashMap::new(); // Discover paths in the root directory let paths = discover_paths(&root_path)?; + // Print discovered paths + for path in &paths { + printl!("Discovered path: {:?}", path); + } let entries: HashMap> = scan_entries(&root_path, paths); + // Print entries + for (path, id) in &entries { + printl!("Found entry: {:?} -> {:?}", path, id); + } + // Strip the root path from the entries let entries: HashMap> = entries .into_iter()