diff --git a/lib/files.php b/lib/files.php
index bdcae419189facf380258e3eae026d9df5bb5327..dd74b0867058f0438449cff23ca599a83a7a57f7 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -222,11 +222,7 @@ class OC_Files {
 	public static function delete($dir,$file){
 		if(OC_User::isLoggedIn()){
 			$file=$dir.'/'.$file;
-			if(OC_Filesystem::is_file($file)){
-				return OC_Filesystem::unlink($file);
-			}elseif(OC_Filesystem::is_dir($file)){
-				return OC_Filesystem::delTree($file);
-			}
+			return OC_Filesystem::unlink($file);
 		}
 	}
 
diff --git a/lib/filestorage.php b/lib/filestorage.php
index b398285d3406f72528ea7e05385fe207d978ed5f..34fa6457fd28a4b9a9d1f52023ad2e97b22c8219 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -50,9 +50,6 @@ class OC_Filestorage{
 	public function fromTmpFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions
 	public function fromUploadedFile($tmpPath,$path){}//copy a file from a temporary file, used for cross-storage file actions
 	public function getMimeType($path){}
-	public function delTree($path){}
-	public function find($path){}
-	public function getTree($path){}
 	public function hash($type,$path,$raw){}
 	public function free_space($path){}
 	public function search($query){}
diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php
index 3bbdd6b41377f388e1d3040f07b681bf1afa07f8..07759b0e88c9af7353b4e353a3fbf3e1656b50e6 100644
--- a/lib/filestorage/local.php
+++ b/lib/filestorage/local.php
@@ -79,9 +79,8 @@ class OC_Filestorage_Local extends OC_Filestorage{
 		}
 	}
 	public function unlink($path){
-		if($return=unlink($this->datadir.$path)){
-			$this->clearFolderSizeCache($path);
-		}
+		$return=$this->delTree($path);
+		$this->clearFolderSizeCache($path);
 		return $return;
 	}
 	public function rename($path1,$path2){
@@ -195,7 +194,8 @@ class OC_Filestorage_Local extends OC_Filestorage{
 		}
 	}
 
-	public function delTree($dir) {
+	private function delTree($dir) {
+		error_log('del'.$dir);
 		$dirRelative=$dir;
 		$dir=$this->datadir.$dir;
 		if (!file_exists($dir)) return true;
@@ -218,36 +218,6 @@ class OC_Filestorage_Local extends OC_Filestorage{
 		return $return;
 	}
 
-	public function find($path){
-		$return=System::find($this->datadir.$path);
-		foreach($return as &$file){
-			$file=str_replace($file,$this->datadir,'');
-		}
-		return $return;
-	}
-
-	public function getTree($dir) {
-		if(substr($dir,-1,1)=='/'){
-			$dir=substr($dir,0,-1);
-		}
-		$tree=array();
-		$tree[]=$dir;
-		$dirRelative=$dir;
-		$dir=$this->datadir.$dir;
-		if (!file_exists($dir)) return true;
-		foreach (scandir($dir) as $item) {
-			if ($item == '.' || $item == '..') continue;
-			if(is_file($dir.'/'.$item)){
-				$tree[]=$dirRelative.'/'.$item;
-			}elseif(is_dir($dir.'/'.$item)){
-				if ($subTree=$this->getTree($dirRelative. "/" . $item)){
-					$tree=array_merge($tree,$subTree);
-				}
-			}
-		}
-		return $tree;
-	}
-
 	public function hash($type,$path,$raw){
 		return hash_file($type,$this->datadir.$path,$raw);
 	}