Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <[email protected]>
  • Loading branch information
tareknaser committed Aug 6, 2024
1 parent adcfb15 commit bb9d142
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fs-index/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub(crate) fn discover_paths<P: AsRef<Path>>(
println!("\t\tFile type: {:?}", entry.file_type());
}

// same but filter_entry(should_index) to skip hidden files and empty files
// same but filter_entry(should_index) to skip hidden files
for entry in WalkDir::new(&root_path)
.min_depth(1)
.into_iter()
Expand Down Expand Up @@ -169,6 +169,14 @@ pub(crate) fn scan_entry<Id: ResourceId>(entry: DirEntry) -> Timestamped<Id> {
/// A helper function to check if the entry should be indexed (not hidden or
/// empty)
fn should_index(entry: &walkdir::DirEntry) -> bool {
println!("should_index?: {:?}", entry.path());

println!("\t\tFile type: {:?}", entry.file_type());

println!("\t\tFile name: {:?}", entry.file_name().to_string_lossy());

println!("\t\tFile metadata: {:?}", entry.metadata());

// Check if the entry is hidden
if entry
.file_name()
Expand Down

0 comments on commit bb9d142

Please sign in to comment.