Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 98906 invoked from network); 29 May 2009 13:39:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 May 2009 13:39:02 -0000 Received: (qmail 2392 invoked by uid 500); 29 May 2009 13:39:14 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 2368 invoked by uid 500); 29 May 2009 13:39:14 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 2358 invoked by uid 500); 29 May 2009 13:39:14 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 2355 invoked by uid 99); 29 May 2009 13:39:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2009 13:39:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2009 13:39:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B37FE234C1EF for ; Fri, 29 May 2009 06:38:50 -0700 (PDT) Message-ID: <6185204.1243604330733.JavaMail.jira@brutus> Date: Fri, 29 May 2009 06:38:50 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Resolved: (CAMEL-1653) clobber option for FileComponent In-Reply-To: <635670087.1243479770777.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen resolved CAMEL-1653. -------------------------------- Resolution: Fixed Lets keep it to the 4 types for now, as we should focus on getting Camel 2.0 out of the door before mid summer. In the future we can add strategy interface for easier plugin of custom code to determine what to do. > clobber option for FileComponent > -------------------------------- > > Key: CAMEL-1653 > URL: https://issues.apache.org/activemq/browse/CAMEL-1653 > Project: Apache Camel > Issue Type: New Feature > Components: camel-core > Affects Versions: 2.0.0 > Reporter: Joe Gottman > Assignee: Claus Ibsen > Priority: Minor > > FileComponent currently has an append option, which is set to true for File Producers to make the Producer write to the end of an existing file, and false to make it overwrite an existing file. However, sometimes it is an error for it to do anything to change an existing file. Would it be possible to add a clobber option to the FileComponent which defaults to true but when set to false prevents the File Producer from modifying an existing file? It should probably throw some kind of Camel Exception when it attempts to write to a file that already exists. If desired, the Route can then catch this Exception and handle it, for instance by trying to write the file to a different location. > This option might also be useful for some other Producer components for the same reason. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.