move load method to top
[phorkie.git] / src / phorkie / Tools.php
index e4aab634583887e98b4e4985673bd4b092a00f19..1d3d2260ebc8aaa27af0ac06aa753f68977f3d45 100644 (file)
@@ -4,8 +4,18 @@ namespace phorkie;
 
 class Tools
 {
+    /**
+     * Delete an entire directory structure
+     *
+     * @param string $path Path to delete
+     *
+     * @return bool
+     */
     public static function recursiveDelete($path)
     {
+        if (!file_exists($path)) {
+            return true;
+        }
         if (!is_dir($path) || is_link($path)) {
             return unlink($path);
         }