private List<NamedReader> getFiles(File dir, String fileSuffix, boolean recurse) {
        try {
            if ( ! dir.exists()) return List.of();
            List<NamedReader> readers = new ArrayList<>();
            for (var i = Files.list(dir.toPath()).iterator(); i.hasNext(); ) {
                var file = i.next();
                if (file.getFileName().toString().endsWith(fileSuffix))
                    readers.add(new NamedReader(file.toString(), IOUtils.createReader(file.toString())));
                else if (recurse)
                    readers.addAll(getFiles(new File(dir, file.getFileName().toString()), fileSuffix, recurse));
            }
            return readers;
        }
        catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
To avoid either double parsing or supplying a name explicitly
config-model/src/main/java/com/yahoo/config/model/test/MockApplicationPackage.java