1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-10 00:36:48 +02:00

Merge pull request #468 from cengizIO/master

[scala/en] Source.fromPath no longer exists
This commit is contained in:
Nami-Doc
2013-12-30 04:28:09 -08:00

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