private boolean processLocal(Function3<String, InputStream, Boolean, Boolean> processor) {
    try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(templateDir,
                                                                 file -> !Files.isDirectory(file) && !Files.isHidden(file))) {
      for (Path path : directoryStream) {
        try (InputStream stream = Files.newInputStream(path)) {
          processor.invoke(path.getFileName().toString(), stream, false);
        }
      }
    }
    catch (NoSuchFileException ignored) {
    }
    catch (IOException e) {
      LOG.error(e);
      return false;
    }
    return true;
  }
private boolean processLocal(Function3<String, InputStream, Boolean, Boolean> processor)