def _mkdir
      if perms_for(@target)[:write] == false
        @response[:error] = 'Access Denied'
        return
      end
      unless valid_name?(@params[:name])
        @response[:error] = 'Unable to create folder'
        return
      end

      dir = @target + @params[:name]
      if !dir.exist? && dir.mkdir
        @params[:tree] = true
        @response[:added] = [to_hash(dir)]
        _open(@target)
      else
        @response[:error] = "Unable to create folder"
      end
    end
def _mkdir
      if perms_for(@target)[:write] == false
        @response[:error] = 'Access Denied'
        return
      end
      unless valid_name?(@params[:name])
        @response[:error] = 'Unable to create folder'
        return
      end

      dir = @target + @params[:name]
      if !dir.exist? && dir.mkdir
        @params[:tree] = true
        @response[:added] = [to_hash(dir)]
        _open(@target)
      else
        @response[:error] = "Unable to create folder"
      end
    end
of tree