1
私は、これはファイルcontent.Iを読むための方法であることを理解として、私は(他のすべての中で)この2行Scalaのio.source fromFileの
import scala.io.Source
val source = Source.fromFile(filename)
を持っているが http://www.scala-lang.org/api/2.12.x/scala/io/Source.html#iter:Iterator[Char]
を読んだ私はまだやりますSource.from Fileが表すもの、Typeメンバーの1つ、または何か他のものを取得しないでください。
最初に参照したソースは抽象的なで、 '.fromFile()'はありません。 コンパニオンオブジェクトが必要です。http://www.scala-lang.org/api/2.12.x/scala/io/Source$.html 第2に、ソースはBufferedSourceであり、そこから多くのコンテンツを取得できます方法。 http://www.scala-lang.org/api/2.12.x/scala/io/BufferedSource.html – WillD