From: Vincent Vanwaelscappel Date: Tue, 13 Feb 2024 17:19:02 +0000 (+0100) Subject: wip #6710 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6fbbb880c84bd623ce2b50863aaee1e8d091bbcc;p=cubist_util.git wip #6710 @0.5 --- diff --git a/src/Zip.php b/src/Zip.php index ba099df..7e5a1f4 100644 --- a/src/Zip.php +++ b/src/Zip.php @@ -87,4 +87,18 @@ class Zip return $cl; } + public static function insertFile($source, $zip) + { + $spl = new \SplFileInfo($source); + $dir = $spl->getPath(); + + $cl = new CommandLine('zip'); + $cl->cd($dir); + $cl->setArg('u'); + $cl->setArg(null, $zip); + $cl->setArg(null, $spl->getFilename()); + $cl->execute(); + $cl->debug(); + } + } \ No newline at end of file