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

      file = @target + @params[:name]
      file.type = :file
      if !file.exist? && file.touch
        @response[:select] = [to_hash(file)]
        _open(@target)
      else
        @response[:error] = "Unable to create file"
      end
    end
def _mkfile
      if perms_for(@target)[:write] == false
        @response[:error] = 'Access Denied'
        return
      end
      unless valid_name?(@params[:name])
        @response[:error] = 'Unable to create file'
        return
      end

      file = @target + @params[:name]
      file.type = :file
      if !file.exist? && file.touch
        @response[:select] = [to_hash(file)]
        _open(@target)
      else
        @response[:error] = "Unable to create file"
      end
    end
of mkdir