Source.fromPath no longer exists (https://github.com/scala/scala/blob/master/src/library/scala/io/Source.scala) Changed example to use Source.fromFile

This commit is contained in:
Cengiz Can 2013-12-30 09:45:15 +02:00
parent 37299ff4da
commit c0a9eabb6c

View File

@ -396,7 +396,7 @@ object Application {
// To read a file line by line
import scala.io.Source
for(line <- Source.fromPath("myfile.txt").getLines())
for(line <- Source.fromFile("myfile.txt").getLines())
println(line)
// To write a file use Java's PrintWriter