WLJS LogoWLJS Notebook

FileTemplateApply

FileTemplateApply[template] applies a template and writes the result to a temporary file, returning its name.

FileTemplateApply[template, args] applies a template using args to fill its slots.

FileTemplateApply[template, args, output] writes the result to the specified output file.

Examples

Apply template to file:

FileTemplateApply[FileTemplate["report.txt"], <|"date" -> DateString[]|>, "output.txt"]

Get temporary file result:

result = FileTemplateApply[template, <|"x" -> 42|>]

Please visit the official Wolfram Language Reference for more details.

On this page