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
- FileTemplateApply operates on template and args just like TemplateApply.
- By default, FileTemplateApply will overwrite any existing content in output if it can.
- The output file can be specified as File["file"] or "file".
Examples
open allclose allBasic 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:
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