summaryrefslogtreecommitdiffhomepage
path: root/scala.html.markdown
diff options
context:
space:
mode:
authorCengiz Can <cengizc@gmail.com>2013-12-30 09:45:15 +0200
committerCengiz Can <cengizc@gmail.com>2013-12-30 09:45:15 +0200
commitc0a9eabb6c6780c6ab1a9501a6aa2bc49b2dd54c (patch)
tree46a0849f68c8c99410de3bc2bcf4b3c9ef664d2b /scala.html.markdown
parent37299ff4da52d10c104b788f66e3833231ae6192 (diff)
Source.fromPath no longer exists (https://github.com/scala/scala/blob/master/src/library/scala/io/Source.scala) Changed example to use Source.fromFile
Diffstat (limited to 'scala.html.markdown')
-rw-r--r--scala.html.markdown2
1 files changed, 1 insertions, 1 deletions
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