I'm unable to extract the first directory from a tar archive:
the destination dir remains empty,
no error is thrown
<?php
$tar = new \PharData('archive.tar');
if ($tar->current()->isDir()) {
echo 'is_dir';
$dir = $tar->current()->getPathname();
$dir = basename($dir);
$tar->extractTo('destination', $dir);
}
?>
the docs hint that the second param could be a name of file OR DIR to be extracted from the archive, is that really possible?