In order to append to the same file, define the transport.vfs.Append=true parameter with the file address URI[1]
<address uri="vfs:file://C:/MyOutputDirectory?transport.vfs.Append=true"/>
Question
I'm writing to a single file with a WSO2 ESB using a VFS endpoint. But this does override the file each time. How can I configure the endpoint to append the content? Or does this feature even exist?
<inSequence>
<log level="full"/>type="STRING"/>
<property name="transport.vfs.ReplyFileName" expression="myOutputFile.txt" scope="transport" type="STRING"/>
<send>
<endpoint>
<address uri="vfs:file://C:/MyOutputDirectory"/>
</endpoint>
</send>
</inSequence>
(my content is text/plain)
Solution
In order to append to the same file, define the transport.vfs.Append=true parameter with the file address URI[1]
<address uri="vfs:file://C:/MyOutputDirectory?transport.vfs.Append=true"/>