2010-12-01から1ヶ月間の記事一覧

テキストファイルをオープンして内容を出力する

(この記事は Scala Advent Calendar jp 2010 : ATND の8日目です。) 「scala.io.Source.fromFile」というのがあってそれが使えそうだった。 val filename = "test.txt" scala.io.Source.fromFile(filename).getLines.foreach(println) おおお簡単!と思っ…

build配下のプロジェクトクラス import sbt._ class MyProject(info: ProjectInfo) extends DefaultProject(info) { override def libraryDependencies = Set( "net.databinder" %% "dispatch" % "0.7.7" ) ++ super.libraryDependencies } 検索するサンプル…