public function __construct(\Pop\Archive\Archive $archive)
{
if (strpos($archive->getFullpath(), '/.') !== false) {
$this->workingDir = substr($archive->getFullpath(), 0, strpos($archive->getFullpath(), '/.'));
} else {
if (strpos($archive->getFullpath(), '\\.') !== false) {
$this->workingDir = substr($archive->getFullpath(), 0, strpos($archive->getFullpath(), '\\.'));
} else {
$this->workingDir = getcwd();
}
}
if (substr($archive->getFullpath(), 0, 1) != '/' && substr($archive->getFullpath(), 1, 1) != ':') {
$this->path = $this->workingDir . DIRECTORY_SEPARATOR . $archive->getFullpath();
} else {
$this->path = realpath(dirname($archive->getFullpath())) . DIRECTORY_SEPARATOR . $archive->getBasename();
}
$this->archive = new \ZipArchive();
}