File entry = new File(subdirectory, s);
String resourceName = pathComponent + s;
if (entry.isDirectory()) {
if (directories && s.endsWith(suffix)) {
resources.add(new ResourceLocation(namespace, resourceName));
}
if (recursive) {
findResources(base, namespace, pathComponent + s, suffix, recursive, directories, resources);
}
} else if (s.endsWith(suffix) && !directories) {
resources.add(new ResourceLocation(namespace, resourceName));
}
}
}
}