How to make Apache Camel delete a file at the end of a "direct" route?
<p>I have a situation where I'm consuming from a <code>direct</code> endpoint.  The body of the <code>Exchange</code> contains a <code>File</code>.  Is there a way via the Spring DSL to delete this <code>File</code> at the end of the route?</p>

<p>For example, I have a route that looks like</p>

<pre><code>&lt;route&gt;
    &lt;from uri="direct:start"/&gt;
    &lt;to uri="file:/data/files"/&gt;
&lt;/route&gt;
</code></pre>

<p>The file gets copied to <code>/data/files</code>, but the original is left alone.</p>

<p>I know I can add something like</p>

<pre><code>&lt;to uri="bean:deleter?method=delete"/&gt;
</code></pre>

<p>to the end of the route to perform the deletion, but I was wondering if there were a camel specific way to handle it.</p>