Is it possible to intercept the unzipping of a directory to change the name of the unzipped folder-to-be?
I'm using the PHP ZipArchive class to do this. The unzipping is working fine, I'd just like to add a timestamp to the unzipped folder's name.
$zip = new ZipArchive;
if ($zip->open($zipFile, ZipArchive::CREATE) === TRUE) {
$zip->extractTo($destinationFolder);
$zip->close();
} else {
return FALSE;
}
EDIT: to further explain the need, my function is currently overwriting folders of the same name at the point of unzipping. I'm hoping to tack on the timestamp to the new folder to prevent that from happening.