On Thu, Nov 15, 2012 at 11:01 PM, Henryk Konsek <[email protected]> wrote: > Hi Gonzalo, > >> Are there any components that allow file "touching" or deletion? > > You can tell File component [1] to delete the file, instead of moving > it. See 'delete' option of the consumer. > > File component doesn't support touching the file (as far as I know). > This is probably because the file producer will update the > lastModified value of the file, but ignore the body of the message. > IMHO This is not in sync with File producer logic, as you take the > timestamp from the message, but ignore the message itself. > > If you want to touch the file, use Groovy for example: > > from("seda:touchQueue"). > to("language:groovy:new > File(request.body).setLastModified(System.currentTimeMillis())"); >
Yeah just write a little bean with methods for deleting or touching a file. And then use the bean component to invoke these methods. Or as shown above you can use a scripting language directly in the DSL. > Best regards. > > [1] http://camel.apache.org/file2.html > > -- > Henryk Konsek > http://henryk-konsek.blogspot.com -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
