 <p>From <a href="http://jesseeichar.github.io/scala-io-doc/0.4.2/index.html#!/core/copy_to" rel="nofollow">scala-io documentation</a>: </p> <pre><code>import scalax.io._ import Resource._ fromFile("a.txt") copyDataTo fromFile("newDir/a.txt") </code></pre>