From 6fbbb880c84bd623ce2b50863aaee1e8d091bbcc Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 13 Feb 2024 18:19:02 +0100 Subject: [PATCH] wip #6710 @0.5 --- src/Zip.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.39.5