Scala script to copy files
- by kulkarni
I want to copy file a.txt to newDir/ from within a scala script.
In java this would be done by creating 2 file streams for the 2 files, reading into buffer from a.txt and writing it to the FileOutputStream of the new file.
Is there a better way to achieve this in scala? May be something in scala.tools.nsc.io._. I searched around but could not find much.