private static List<Media> getFilesByExtension(Media path, String extension)
    {
        final List<Media> filesList = new ArrayList<>(1);
        getFilesByExtensionRecursive(filesList, path, extension);
        return filesList;
    }
private static List < Media > getFilesByExtension ( Media path , String extension ) { final List < Media > filesList = new ArrayList < > ( 1 ) ; getFilesByExtensionRecursive ( filesList , path , extension ) ; return filesList ; }
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.