Sign in using Google or Yahoo! id.  

Scala reading file content line-by-line

 Comments Share:   Twitter   Reddit   HackerNews   Facebook 
import scala.io.Source

val lines = Source.fromFile("/path/to/file.ext").getLines
lines.foreach{ line =>
    print(line)
}
Posted on March 02, 2010 07:54 AM by Subhash Chandran
scala
blog comments powered by Disqus