def METHOD_NAME(self, filename, rules, version, ver_type):
    displaypath = filename if self.__lastdir__ == '' else os.path.relpath(filename, os.path.join(self.__lastdir__, '../'))
    Message.ShowStatus('正在更新 %s 中的版本号到: %s' % (displaypath, version))
    for rule in rules:
        if 'for_type' in rule and rule['for_type'] != ver_type:
            continue
        usever = self.versionFormat(version, rule['vmode'])
        replto = rule['replto'] % usever
        Common.match_file_resub(filename, rule['regex'], replto)