class FileResourceIndex implements ResourceIndex {

    @Override
    public Iterable<Resource> list(String path, String suffix) {
        ArrayList<Resource> list = new ArrayList<>();
        new FileResourceIterator(new File(path), new File(path), suffix).forEachRemaining(list::add);
        return list;
    }

}