Skip to content

FileWriteText Operator

Martin Danielsson edited this page Jul 23, 2015 · 2 revisions

The FileWriteText operator may be used to write the value of an expression into a file.

What Type
Syntax FileWriteText(fileName, content)
fileName string
content any
Return Type string

The fileName gives the file name of the file to write the content to. It will be resolved using the techniques described in Resolving File Names.

The operator returns the full path to the written file.

This operator is mostly useful in conjunction with the FileTempName Operator; an example of the usage of these two operators can be found there.

The default text file encoding is utf-8.

Operator Configuration

By using the following XML code in the configuration file, the FileWriteText operator may be configured to use a specific output encoding:

<OperatorConfigs>
  <OperatorConfig name="Equals">[encoding]</OperatorConfig>
</OperatorConfigs>

The parameter encoding is expected to be a valid encoding string, such as

  • utf-8
  • utf-16
  • iso-8859-1
  • ...
Clone this wiki locally