title: Shortest way to get File object from resource in Groovy
body: <p>Right now I'm using Java API to create file object from resource:</p>
  
  <pre><code>new File(getClass().getResource('/resource.xml').toURI())
  </code></pre>
  
  <p>Is there any more idiomatic/shorter way to do that in Groovy using GDK?</p>