From dabb7fa0d6d98b56605e2fe38917ab7dab599742 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 19 Nov 2021 11:39:55 +0100 Subject: [PATCH] wip #4891 @0:05 --- src/Files/Files.php | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.39.5