From: Vincent Vanwaelscappel Date: Mon, 13 Feb 2023 12:16:37 +0000 (+0100) Subject: wip #5725 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0baadf8e02f0c4e84c762e0c5b01a0ffa81a3a89;p=fluidbook_distantstorage.git wip #5725 @0.25 --- diff --git a/app/src/Tools.php b/app/src/Tools.php index 4b0a15d..9e76bae 100644 --- a/app/src/Tools.php +++ b/app/src/Tools.php @@ -11,12 +11,18 @@ class Tools { Zip::archive($a['source'], $a['dest'], $a['compression']); } + /** + * @throws \Exception + */ public static function copy($a) { foreach ($a['files'] as $from => $to) { self::_cp($from, $to); } } + /** + * @throws \Exception + */ public static function lazyCopy($a) { foreach ($a['files'] as $from => $to) { if (file_exists($from)) { @@ -25,6 +31,9 @@ class Tools { } } + /** + * @throws \Exception + */ protected static function _cp($from, $to) { Files::mkdir(dirname($to)); Files::copyFile($from, $to);