New APIο
Warning
This feature is experimental and subject to breaking changes. See the Conan stability section for more information.
Warning
Subapis must not be initialized by themselves. They are intended to be accessed only through the main ConanAPI attributes.
- class NewAPI(conan_api)ο
- save_template(template: str, defines=None, output_folder=None, force=False)ο
Save the
templatefiles in theoutput_folder, replacing the template variables with thedefines- Parameters:
template β The template to use: a path to a folder containing the template files (absolute or relative to the current working directory), or the name of a template, either those available under
<conan_home>/templates/command/new/<template>or the built-in onesdefines β A list with the
k=vvariables to replace in the templateoutput_folder β The folder where the template files will be saved, cwd if
Noneforce β If
True, overwrite the files if they already exist, otherwise raise an error