code: private static List<Media> getFilesByExtension(Media path, String extension)
      {
          final List<Media> filesList = new ArrayList<>(1);
          getFilesByExtensionRecursive(filesList, path, extension);
          return filesList;
      }
docs: Get all files existing in the path considering the extension.
  
  @param path The path to check.
  @param extension The extension (without dot; eg: png).
  @return The files list.