private function deleteDir($dirPath)
	{
		if (!is_dir($dirPath)) {
			$success = unlink($dirPath);
		} else {
			$success = true;
			foreach (array_reverse(elFinderVolumeFTP::listFilesInDirectory($dirPath, false)) as $path) {
				$path = $dirPath . DIRECTORY_SEPARATOR . $path;
				if(is_link($path)) {
					unlink($path);
				} else if (is_dir($path)) {
					$success = rmdir($path);
				} else {
					$success = unlink($path);
				}
				if (!$success) {
					break;
				}
			}
			if($success) {
				$success = rmdir($dirPath);
			}
		}
		if(!$success) {
			$this->setError(elFinder::ERROR_RM, $dirPath);
			return false;
		}
		return $success;
	}
private function deleteDir($dirPath)
	{
		if (!is_dir($dirPath)) {
			$success = unlink($dirPath);
		} else {
			$success = true;
			foreach (array_reverse(elFinderVolumeFTP::listFilesInDirectory($dirPath, false)) as $path) {
				$path = $dirPath . DIRECTORY_SEPARATOR . $path;
				if(is_link($path)) {
					unlink($path);
				} else if (is_dir($path)) {
					$success = rmdir($path);
				} else {
					$success = unlink($path);
				}
				if (!$success) {
					break;
				}
			}
			if($success) {
				$success = rmdir($dirPath);
			}
		}
		if(!$success) {
			$this->setError(elFinder::ERROR_RM, $dirPath);
			return false;
		}
		return $success;
	}
private function deleteDir ( $ dirPath ) { if ( ! is_dir ( $ dirPath ) ) { $ success = unlink ( $ dirPath ) ; } else { $ success = true ; foreach ( array_reverse ( elFinderVolumeFTP :: listFilesInDirectory ( $ dirPath , false ) ) as $ path ) { $ path = $ dirPath . DIRECTORY_SEPARATOR . $ path ; if ( is_link ( $ path ) ) { unlink ( $ path ) ; } else if ( is_dir ( $ path ) ) { $ success = rmdir ( $ path ) ; } else { $ success = unlink ( $ path ) ; } if ( ! $ success ) { break ; } } if ( $ success ) { $ success = rmdir ( $ dirPath ) ; } } if ( ! $ success ) { $ this -> setError ( elFinder :: ERROR_RM , $ dirPath ) ; return false ; } return $ success ; }
Delete local directory recursively.
@param $dirPath string to directory to be erased.
@return bool true on success and false on failure.
Delete local directory recursively .