]> _ Git - cubist_util.git/commitdiff
wip #4891 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 19 Nov 2021 10:39:55 +0000 (11:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 19 Nov 2021 10:39:55 +0000 (11:39 +0100)
src/Files/Files.php

index 1807805ea7adfb15b839a561bcc21d8181acd1dd..cb4f9f7c7fc4abb9720884a38ad1c15cb487c796 100644 (file)
@@ -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);