<write-file>
Writes the specified content to the specified file.
| Name | XPath | Description | Reagent Type | Expected Type | Required |
|---|---|---|---|---|---|
| STRING | @string | Contents of the new file as a String. The default is the value of the 'Attributes.STRING' request attribute. | PHRASE | java.lang.String | No |
| FILE | @file | Optional file system path to which the contents of STRING will be written. It may be absolute or relative, in which case it will be evaluated from the directory in which Java is executing. The default is the value of the 'Attributes.LOCATION' request attribute. | PHRASE | java.lang.String | No |
Reads the file 'example.txt' into a String, replaces all instances of 'foo' with 'bar' and all instances of 'abc' with 'xyz' in the text, then writes the result back to 'example.txt':