title: Spring Integration File Outbound Channel Adapter and file last modified date
body: <p>I'm trying to make a File Outbound Channel Adapter to write a file having the last modified date attribute set to a custom value instead of system current time.</p>
  
  <p>according to the documentation (<a href="http://docs.spring.io/spring-integration/docs/4.3.11.RELEASE/reference/html/files.html#file-timestamps" rel="nofollow noreferrer">http://docs.spring.io/spring-integration/docs/4.3.11.RELEASE/reference/html/files.html#file-timestamps</a>) I'm supposed to set the <code>preserve-timestamp</code> attribute to <code>true</code> on the outbound and set the header <code>file_setModified</code> to the desired timestamp in the messages. </p>
  
  <p>Anyway I made several attempts without success.</p>
  
  <p>This is a code snippet to show what I'm doing right now:</p>
  
  <pre><code>&lt;int:inbound-channel-adapter
      channel="msg.channel"
      expression="'Hello'"&gt;
      &lt;int:poller fixed-delay="1000"/&gt;
  &lt;/int:inbound-channel-adapter&gt;
  
  &lt;int:header-enricher
      input-channel="msg.channel"
      output-channel="msgEnriched.channel"&gt;
  
      &lt;int:header
          name="file_setModified"
          expression="new Long(1473897600)"/&gt;
  &lt;/int:header-enricher&gt;
  
  &lt;int-file:outbound-channel-adapter
      id="msgEnriched.channel"
      preserve-timestamp="true"
      directory="/tmp/foo"/&gt;
  </code></pre>
  
  <p>what's wrong with that?</p>
  
  <p>(using Spring Integration 4.3.11)</p>