Scala script to copy files

Posted by kulkarni on Stack Overflow See other posts from Stack Overflow or by kulkarni
Published on 2010-02-08T22:02:31Z Indexed on 2010/06/12 13:42 UTC
Read the original article Hit count: 423

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about scala

Related posts about files