code: private static void dirToTarArchiveOutputStream(Path destDir, TarArchiveOutputStream tarArchiveOutputStream)
        throws IOException {
      TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(formatPathToDir(destDir));
      tarArchiveEntry.setModTime(System.currentTimeMillis());
      tarArchiveOutputStream.putArchiveEntry(tarArchiveEntry);
      tarArchiveOutputStream.closeArchiveEntry();
    }
docs: Helper method for {@link #tar(FileSystem, FileSystem, Path, Path)} that adds a directory entry to a given
  {@link TarArchiveOutputStream}.