def _rename
      unless valid_name?(@params[:name])
        @response[:error] = "Unable to rename #{@target.ftype}"
        return
      end

      to = @target.dirname + @params[:name]

      perms_for_target = perms_for(@target)
      if perms_for_target[:locked] == true
        @response[:error] = 'Access Denied'
        return
      end

      perms_for_current = perms_for(@target)
      if perms_for_current[:write] == false
        @response[:error] = 'Access Denied'
        return
      end

      if to.exist?
        @response[:error] = "Unable to rename #{@target.ftype}. '#{to.basename}' already exists"
      else
        to = @target.rename(to)
        if to
          @response[:added] = [cdc_for(to)]
          @response[:removed] = [to_hash(@target)]
        else
          @response[:error] = "Unable to rename #{@target.ftype}"
        end
      end
    end
def _rename
      unless valid_name?(@params[:name])
        @response[:error] = "Unable to rename #{@target.ftype}"
        return
      end

      to = @target.dirname + @params[:name]

      perms_for_target = perms_for(@target)
      if perms_for_target[:locked] == true
        @response[:error] = 'Access Denied'
        return
      end

      perms_for_current = perms_for(@target)
      if perms_for_current[:write] == false
        @response[:error] = 'Access Denied'
        return
      end

      if to.exist?
        @response[:error] = "Unable to rename #{@target.ftype}. '#{to.basename}' already exists"
      else
        to = @target.rename(to)
        if to
          @response[:added] = [cdc_for(to)]
          @response[:removed] = [to_hash(@target)]
        else
          @response[:error] = "Unable to rename #{@target.ftype}"
        end
      end
    end
of mkfile