code: public void clean(final Collection<? extends FileSystemDatasetVersion> deletableVersions, final FileSystemDataset fsDataset) throws IOException {
      if (deletableVersions.isEmpty()) {
        log.warn("No deletable dataset version can be found. Ignoring.");
        return;
      }
      Set<Path> possiblyEmptyDirectories = new HashSet<>();
      for (FileSystemDatasetVersion fsdv : deletableVersions) {
        clean(fsdv, possiblyEmptyDirectories);
      }
      cleanEmptyDirectories(possiblyEmptyDirectories, fsDataset);
    }
docs: Delete all {@link FileSystemDatasetVersion}s <code>deletableVersions</code> and also delete any empty parent directories.
  
  @param fsDataset to which the version belongs.