code: public static boolean deleteRecursive(File path, FileFilter fileFilter) {
      boolean success = true;
  
      for (File file : safeListFiles(path, fileFilter)) {
        success &= (isDirectory(file) ? deleteRecursive(file, fileFilter) : delete(file));
      }
  
      return (success && fileFilter.accept(path) && delete(path));
    }
docs: Deletes the given {@link File} from the file system if accepted by the given {@link FileFilter}.
  
  If the {@link File} is a directory, then this method recursively deletes all files and subdirectories
  accepted by the {@link FileFilter} in the given directory along with the directory itself.
  
  If the {@link File} is just a plain old file, then only the given file will be deleted if accepted
  by the {@link FileFilter}.
  
  This method attempts to delete as many files as possible.
  
  @param path the {@link File} to delete from the file system.
  @param fileFilter the {@link FileFilter} used to identify the {@link File}s to delete.
  @return a boolean value indicating whether the given {@link File} was successfully deleted from the file system.
  @see java.io.File
  @see java.io.FileFilter
  @see #safeListFiles(File)
  @see #isDirectory(File)
  @see #delete(File)