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:

Introduced in 2014
 (10.0)