diff options
author | Cengiz Can <cengizc@gmail.com> | 2013-12-30 09:45:15 +0200 |
---|---|---|
committer | Cengiz Can <cengizc@gmail.com> | 2013-12-30 09:45:15 +0200 |
commit | c0a9eabb6c6780c6ab1a9501a6aa2bc49b2dd54c (patch) | |
tree | 46a0849f68c8c99410de3bc2bcf4b3c9ef664d2b | |
parent | 37299ff4da52d10c104b788f66e3833231ae6192 (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
-rw-r--r-- | scala.html.markdown | 2 |
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 |