This piece of scala code:
val file = new File(".")
assert(file.exists == true)
assert(file.getAbsolutePath.length > 0)
println(scala.io.Source.fromFile(file).getLines)
Throws:
FileNotFoundException: . (No such file or directory) (FileInputStream.java:120)
While making the scala.io.Source.fromFile call. How is this possible and how can I fix it?
PS: This is in the context of a playframework app test.
Maybe because:
passes as well? You cannot really open a directory and read it, you can only open files. BTW on my machine the error is more descriptive:
Tested on: