title: File Copy Options Not Recognised When Using Files.copy
body: <p>I have a Groovy script to copy a file which works fine until I try to add the option to copy the file attributes as well, i.e. to preserve the timestamps.</p>
  
  <p>This works: </p>
  
  <pre><code>import java.nio.file.*
  
  def fileEx = new File(/Y:\Documents\Test File.txt/)
  def fileDest = new File(/Y:\Documents\Test File copied with Groovy and Nio.txt/)
  
  def fileExPath = fileEx.toPath()
  def fileDestPath = fileDest.toPath()
  
  Files.copy(fileExPath, fileDestPath)
  </code></pre>
  
  <p>But this fails:</p>
  
  <pre><code>import java.nio.file.*
  
  def fileEx = new File(/Y:\Documents\Test File.txt/)
  def fileDest = new File(/Y:\Documents\Test File copied with Groovy and Nio.txt/)
  
  def fileExPath = fileEx.toPath()
  def fileDestPath = fileDest.toPath()
  
  Files.copy(fileExPath, fileDestPath, COPY_ATTRIBUTES)
  </code></pre>
  
  <p>with the error:</p>
  
  <pre><code>Caught: groovy.lang.MissingPropertyException: No such property: COPY_ATTRIBUTES for class: temp
  groovy.lang.MissingPropertyException: No such property: COPY_ATTRIBUTES for class: temp
      at temp.run(temp.groovy:9)
  </code></pre>
  
  <p>I've tried putting COPY_ATTRIBUTES in single quotes and double quotes, but that doesn't help.  Please can someone tell me what I'm doing wrong?</p>