FileTemplateApply

FileTemplateApply[template]

applies a template, evaluating all template elements it contains, and then writes the result to a temporary file, whose name is returned.

FileTemplateApply[template,args]

applies a template, using args to fill its slots, and then writes the result to a temporary file.

FileTemplateApply[template,output]

applies a template, writing the results to the file represented by output.

FileTemplateApply[template,args,output]

applies a template, using args to fill its slots, and then writes the result to the file represented by output.

Details and Options

Examples

open allclose all

Basic Examples  (1)

FileTemplateApply works with any expression:

The first argument is handled by TemplateApply and can be a String, File, or any TemplateObject:

Specify a path to export the template in the specified location:

Scope  (5)

File is fully supported:

File can also be used as a third argument, to specify the result:

Templates can be hosted in the Wolfram Cloud:

The result can be saved to a CloudObject:

URL can be used to fetch templates:

Wolfram Research (2014), FileTemplateApply, Wolfram Language function, https://reference.wolfram.com/language/ref/FileTemplateApply.html.

Text

Wolfram Research (2014), FileTemplateApply, Wolfram Language function, https://reference.wolfram.com/language/ref/FileTemplateApply.html.

CMS

Wolfram Language. 2014. "FileTemplateApply." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FileTemplateApply.html.

APA

Wolfram Language. (2014). FileTemplateApply. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileTemplateApply.html

BibTeX

@misc{reference.wolfram_2023_filetemplateapply, author="Wolfram Research", title="{FileTemplateApply}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FileTemplateApply.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_filetemplateapply, organization={Wolfram Research}, title={FileTemplateApply}, year={2014}, url={https://reference.wolfram.com/language/ref/FileTemplateApply.html}, note=[Accessed: 19-April-2024 ]}