[
https://issues.apache.org/jira/browse/CAMEL-5521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439441#comment-13439441
]
Claus Ibsen commented on CAMEL-5521:
------------------------------------
And the option eagerDeleteTargetFile can be used to control if Camel should
delete any existing file (from moveExisting). Its default true.
So by default that means the moveExisting will keep the last file with that
given name.
If you set eagerDeleteTargetFile=false, and there exists a file, then an
exception is thrown, and the file is not written.
> Add option to file/ftp producer to move any existing file before writing
> ------------------------------------------------------------------------
>
> Key: CAMEL-5521
> URL: https://issues.apache.org/jira/browse/CAMEL-5521
> Project: Camel
> Issue Type: New Feature
> Components: camel-core, camel-ftp
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.11.0
>
> Attachments: CAMEL-5521.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/File-Component-Rename-an-existing-file-tp5716075.html
> We should add new moveExisting enum to fileExist option, so end user can
> configure Camel to move any existing file before writing a new file.
> That would need a corresponding option to set the expression for the new name
> to use.
> For example to append .old to the existing name
> moveExisting=${file:name}.old
> The trick would be if there is already an .old file. In that case Camel
> should fail with an exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira