title: How to copy Jenkins secret files
body: <p>I have already added 2 secret files to Jenkins credentials with names <code>PRIVATE-KEY</code> and <code>PUBLIC-KEY</code>. 
  How can I copy those 2 files to <code>/src/resources</code> directory inside a job?</p>
  
  <p>I have the following snippet</p>
  
  <pre><code>withCredentials([file(credentialsId: 'PRIVATE_KEY', variable: 'my-private-key'),
                   file(credentialsId: 'PUBLIC_KEY', variable: 'my-public-key')]) {
     //how to copy, where are those files to copy from?
  }
  </code></pre>