private static <T> List<T> components(File appDir, BiFunction<Bundle, ComponentInfo, T> toValue) {
        List<T> components = new ArrayList<>();
        for (Bundle bundle : Bundle.getBundles(applicationFile(appDir, COMPONENT_DIR))) {
            components.add(toValue.apply(bundle, new ComponentInfo(Path.fromString(COMPONENT_DIR).append(bundle.getFile().getName()).getRelative())));
        }
        return components;
    }
Creates a reader for a config definition

@param defPath the path to the application package
@return the reader of this config definition
config-application-package/src/main/java/com/yahoo/config/model/application/provider/FilesApplicationPackage.java