title: how to delete local file in ftp inbound-channel-adapter of Spring integration
body: <p>I have a integration case that get xml payload from FTP then use http outbound channel to sent the payload to webservice, ftp inbound-channel-adapter has a mandatory attribute named local-directory, remote ftp files will be downloaded here, however when I restart, seems all files in local-directory will be handled again, may I know how to avoid this?
  One possible way is to  delete local file in ftp inbound-channel-adapter, how to do it, can you advise?</p>
  
  <p>thanks</p>
  
  <p>My Spring integration configurations</p>
  
  <pre><code>&lt;ftp:inbound-channel-adapter
          channel="requestChannel"
          session-factory="ftpClientSessionFactory"
          remote-directory="/outbound"
          local-directory="/temp"
          auto-create-local-directory="true"
          delete-remote-files="false"
          filename-pattern="*.xml"
          temporary-file-suffix=".writing"&gt;
      &lt;int:poller fixed-delay="5000" max-messages-per-poll="10"/&gt;
  &lt;/ftp:inbound-channel-adapter&gt;
  
  
  &lt;int:chain id="inboundChain" input-channel="requestChannel" output-channel="replyChannel"&gt;
  
      &lt;int:transformer ref="xmlToJsonTransformer" /&gt;
      &lt;int:transformer ref="jsonToMapTransformer" /&gt;
      &lt;int:header-enricher&gt;
          &lt;int:header name="Content-Type" value="application/json" overwrite="true"/&gt;
      &lt;/int:header-enricher&gt;
      &lt;http:outbound-gateway  expected-response-type="java.lang.String"
                             url="http://localhost:8080/postService/postupdate"
                             http-method="POST"
                             extract-request-payload="true"
                              request-factory="requestFactory"&gt;
      &lt;/http:outbound-gateway&gt;
  &lt;/int:chain&gt;
  </code></pre>