Quantcast
Channel: Read entire file in Scala? - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Answer by Atiq for Read entire file in Scala?

$
0
0

you can also use Path from scala io to read and process files.

import scalax.file.Path

Now you can get file path using this:-

val filePath = Path("path_of_file_to_b_read", '/')val lines = file.lines(includeTerminator = true)

You can also Include terminators but by default it is set to false..


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>