]> _ Git - cubist_util.git/commitdiff
wip #6710 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Feb 2024 17:19:02 +0000 (18:19 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Feb 2024 17:19:02 +0000 (18:19 +0100)
src/Zip.php

index ba099df9e22178c268ba7c18f6b0ff1898a81ea6..7e5a1f4096af6312e231e3d2f44edb4d1cfcfa44 100644 (file)
@@ -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