code: func (archiver *Archiver) CopyWithTar(src, dst string) error {
  	srcSt, err := archiver.SrcDriver.Stat(src)
  	if err != nil {
  		return err
  	}
  	if !srcSt.IsDir() {
  		return archiver.CopyFileWithTar(src, dst)
  	}
  
  	// if this archiver is set up with ID mapping we need to create
  	// the new destination directory with the remapped root UID/GID pair
  	// as owner
  
  	identity := idtools.Identity{UID: archiver.IDMapping.RootPair().UID, GID: archiver.IDMapping.RootPair().GID}
  
  	// Create dst, copy src's content into it
  	if err := idtools.MkdirAllAndChownNew(dst, 0755, identity); err != nil {
  		return err
  	}
  	logrus.Debugf("Calling TarUntar(%s, %s)", src, dst)
  	return archiver.TarUntar(src, dst)
  }
docs: // CopyWithTar creates a tar archive of filesystem path `src`, and
  // unpacks it at filesystem path `dst`.
  // The archive is streamed directly with fixed buffering and no
  // intermediary disk IO.