code: @Override
  	@SuppressWarnings("unchecked")
  	public boolean delDir(String dirPath) {
  		if (false == cd(dirPath)) {
  			return false;
  		}
  
  		Vector<LsEntry> list = null;
  		try {
  			list = channel.ls(channel.pwd());
  		} catch (SftpException e) {
  			throw new JschRuntimeException(e);
  		}
  
  		String fileName;
  		for (LsEntry entry : list) {
  			fileName = entry.getFilename();
  			if (false == fileName.equals(".") && false == fileName.equals("..")) {
  				if (entry.getAttrs().isDir()) {
  					delDir(fileName);
  				} else {
  					delFile(fileName);
  				}
  			}
  		}
  
  		if (false == cd("..")) {
  			return false;
  		}
  
  		// 删除空目录
  		try {
  			channel.rmdir(dirPath);
  			return true;
  		} catch (SftpException e) {
  			throw new JschRuntimeException(e);
  		}
  	}
docs: 删除文件夹及其文件夹下的所有文件
  
  @param dirPath 文件夹路径
  @return boolean 是否删除成功