I would like to write a method similar to the following
def appendFile(fileName: String, line: String) = {
}
But I’m not sure how to flesh out the implementation. Another question on here alludes to Scala 2.9 capabilities but I could not find further details.
There is no scala-specific IO implementation at the moment, although I understand one written by Jesse Eichar is in incubation. I’m not sure, to what extent this makes use of the new File (path) API in JDK7. Because of this, for now I would go with the simple Java: