Skip to content

Commit

Permalink
Closes PHPGangsta#2 by adding the possibility to extract archived fil…
Browse files Browse the repository at this point in the history
…es with their full paths to the decompress-method while keeping default behaviour.
  • Loading branch information
mehldau committed Apr 13, 2017
1 parent 9ae302a commit 6a521a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SevenZipArchive.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ public function compress()
}
}

public function decompress()
public function decompress($withFullPath=false)
{
$extractFlag = $withFullPath ? 'x' : 'e';

$command = '"' . $this->_executablePath . '"'
. ' e'
. " {$extractFlag}"
. ' -y'
. $this->_getPasswordParam()
. ' ' . escapeshellarg($this->_archivePath)
Expand Down

0 comments on commit 6a521a5

Please sign in to comment.