Try to use single Comparator<File> anonymous implementation here.