From: Vincent Vanwaelscappel Date: Fri, 19 Nov 2021 10:39:55 +0000 (+0100) Subject: wip #4891 @0:05 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=dabb7fa0d6d98b56605e2fe38917ab7dab599742;p=cubist_util.git wip #4891 @0:05 --- diff --git a/src/Files/Files.php b/src/Files/Files.php index 1807805..cb4f9f7 100644 --- a/src/Files/Files.php +++ b/src/Files/Files.php @@ -36,6 +36,13 @@ class Files return realpath($path).'/'; } + public static function emptyDir($path){ + if(file_exists($path)){ + self::rmdir($path); + } + return self::mkdir($path); + } + public static function humanReadableSize($size, $precision = 2) { $base = log($size) / log(1024);