Copy a file.
1 file.copy
<file.copy>
<src /> !
<dst /> !
</file.copy>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Esrc | File|InputStream | String of bytes to copy, this can be obtained directly from a file or from a string of characters InputStream. | |||
Edst | File|OutputStream | String of resulting bytes of the copy. |
Returns | |
---|---|
Type | Description |
integer | Number of copied bytes. |
Example
Copy a file of a directory to another.
Copy
<xsql-script name='file_copy_sample1'> <body> <set name='m_srcfile'> <string>c:<file.separator />source<file.separator />deister.txt</string> </set> <set name='m_dstfile'> <string>c:<file.separator />destination<file.separator />deister.txt</string> </set> <file.copy> <file name='#m_srcfile' type='absolute' /> <file name='#m_dstfile' type='absolute' /> </file.copy> </body> </xsql-script>