Did you notice that the ireation between both types of searches are the same the only thing that change is the comparison, remember always this, duplication is evil, so we need to refactor this iteration between dirs and files