code: private static void getFilesByExtensionRecursive(Collection<File> filesList, File path, String extension)
      {
          Optional.ofNullable(path.listFiles()).ifPresent(files -> Arrays.asList(files).forEach(content ->
          {
              if (content.isDirectory())
              {
                  getFilesByExtensionRecursive(filesList, content, extension);
              }
              if (content.isFile() && extension.equals(getExtension(content)))
              {
                  filesList.add(content);
              }
          }));
      }
docs: Get all files existing in the path considering the extension.
  
  @param filesList The files list.
  @param path The path to check.
  @param extension The extension (without dot; eg: png).