SyntaxFix
Write A Post
Hire A Developer
Questions
You can use
Source.fromFile(fileName).getLines().mkString
however it should be noticed that getLines() removes all new line characters. If you want save formatting you should use
Source.fromFile(fileName).iter.mkString