code: public void cleanEmptyDirectories(final Set<Path> possiblyEmptyDirectories, final FileSystemDataset fsDataset) throws IOException {
      if (this.deleteEmptyDirectories && !this.simulate) {
        for (Path parentDirectory : possiblyEmptyDirectories) {
          PathUtils.deleteEmptyParentDirectories(fs, fsDataset.datasetRoot(), parentDirectory);
        }
      }
    }
docs: Deletes any empty paths in <code>possiblyEmptyDirectories</code> all the way upto the {@link FileSystemDataset#datasetRoot()}.