def create_file(cls, key, path, infos): template_path = cls.get_template_path(key, infos['project_root']) if path is None: target_path = cls.get_target_path(key, infos['project_root'], infos['project_name']) else: target_path = path content = TemplateUtils.replace(FileUtils.get_content(template_path), infos) FileUtils.create(target_path, content)
def __copy_template(cls, key, project_root): target = cls.__get_project_template_path(key, project_root) source = cls.__get_cup_template_path(key) FileUtils.create(target, FileUtils.get_content(source))