5.4.5. Text files (plain files)
MetaFactory produces several kinds of files:
java source code,
xml files and
plain text files like JavaScript, HTML, JSON, YAML.
The <file> element is the way to create create plain text files.
Usage
1<code_instruction>
2 ...
3 <file>
4 name=""
5 path=""
6 description=""
7 writePolicy
8 trimLeading=""
9 trimTrailing=""
10 format=""
11 code instruction base
12
13 <body></body>
14 </file>
15 ...
16</code_instruction>
Attributes
Name |
Details |
---|---|
name |
The name of the file made. Mandatory |
path |
Path where the file is saved. |
description |
Description of the file. Not used in the produced file. |
writePolicy |
Generates the source only if the source does not already exist. Values: once|always. Default: allways |
trimLeading |
true or false. If true, leading spaces are removed. |
trimTrailing |
true or false. If true, trailing spaces are removed. |
format |
|
code instruction base |
Sub elements
Name |
Details |
Number |
---|---|---|
body |
Content of the file. A snippet can also be used. |
0 or 1 |