Open a file to writing.
1 file.writer.open
<file.writer.open
id='id'
append='append'
encoding='encoding'
>
<file /> !
</file.writer.open>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aid | string | Identifier of the file. | |||
Aappend | boolean | true to add content. | |||
Aencoding | string | ISO-8859-1 | Indicates the encoding of the file which is created, for example ISO-8859-1 or UTF-1. If not specified, the ISO-8859-1 is used. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Efile | file |
Returns | |
---|---|
Type | Description |
File | File handler. |
Example
Open a file to write in it.
Copy
<xsql-script name='file_writer_open_sample1'> <body> <set name='m_file'> <string>c:<file.separator />source<file.separator />deister.txt</string> </set> <file.writer.open id='out1' append='true'> <file name='#m_file' type='absolute' /> </file.writer.open> <file.writer.println id='out1'> hello </file.writer.println> <file.writer.close id='out1' /> </body> </xsql-script>