]> source.dussan.org Git - nextcloud-server.git/commitdiff
recursive deletion is now in OC_HELPER
authorRobin Appelman <icewind1991@gmail.com>
Sun, 29 May 2011 15:01:34 +0000 (17:01 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Sun, 29 May 2011 15:01:34 +0000 (17:01 +0200)
lib/files.php

index ac2129d0ac466c6ca8b56eb5a8b26c04efe6d52a..2a56c5b4b37b5731daeef27656abd2c360eb405b 100644 (file)
@@ -311,24 +311,6 @@ function zipAddDir($dir,$zip,$internalDir=''){
     }
 }
 
-//remove a dir and it's content
-function delTree($dir) {
-       if (!file_exists($dir)) return true;
-       if (!is_dir($dir) || is_link($dir)) return unlink($dir);
-       foreach (scandir($dir) as $item) {
-               if ($item == '.' || $item == '..') continue;
-               if(is_file($dir.'/'.$item)){
-                       unlink($dir.'/'.$item);
-               }elseif(is_dir($dir.'/'.$item)){
-                       if (!delTree($dir. "/" . $item)){
-                               return false;
-                       };
-               }
-       }
-       $return=rmdir($dir);
-       return $return;
-}
-
 if(!function_exists('sys_get_temp_dir')) {
     function sys_get_temp_dir() {
         if( $temp=getenv('TMP') )        return $temp;