Skip to content

Instantly share code, notes, and snippets.

@dacr
Created April 27, 2014 08:03
Show Gist options
  • Save dacr/11340168 to your computer and use it in GitHub Desktop.
Save dacr/11340168 to your computer and use it in GitHub Desktop.
def res2file(from: String, dest: File) {
import scalax.io._
val in = Resource.fromInputStream(getClass().getClassLoader.getResourceAsStream(from))
val output: Output = Resource.fromFile(dest)
output.write(in.bytes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment