From c0a9eabb6c6780c6ab1a9501a6aa2bc49b2dd54c Mon Sep 17 00:00:00 2001 From: Cengiz Can Date: Mon, 30 Dec 2013 09:45:15 +0200 Subject: Source.fromPath no longer exists (https://github.com/scala/scala/blob/master/src/library/scala/io/Source.scala) Changed example to use Source.fromFile --- scala.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scala.html.markdown') diff --git a/scala.html.markdown b/scala.html.markdown index 03c1ea76..5dfaefe0 100644 --- a/scala.html.markdown +++ b/scala.html.markdown @@ -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 -- cgit v1.2.3