summaryrefslogtreecommitdiffhomepage
path: root/scala.html.markdown
diff options
context:
space:
mode:
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