You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a helper to uncompress? Currently I'm using the native PHP class ZipArchive, but it seems natural to have an uncompress helper method as well.
privatefunctionunzip(string$filename, string$dir)
{
$zip = newZipArchive();
if ($zip->open($filename)) {
$zip->extractTo($dir);
$zip->close();
} else {
$this->io()->error("Unable to unzip $filename to $dir");
}
}
privatefunctionzip(string$dir, string$filename)
{
// compress a local directory (all files (recursive) in "some/local/directory" are added to archive)$zipFile = ZipFile::compress(new \SplFileInfo($dir), $filename);
}
The text was updated successfully, but these errors were encountered:
Is there a helper to uncompress? Currently I'm using the native PHP class ZipArchive, but it seems natural to have an uncompress helper method as well.
The text was updated successfully, but these errors were encountered: