6
Scalaのリソースフォルダーからファイルを読み取る方法は?
以下のようなフォルダ構造があります。 - main -- java -- resources -- scalaresources --- commandFiles そしてそのフォルダーには、私が読まなければならないファイルがあります。これがコードです: def readData(runtype: String, snmphost: String, comstring: String, specificType: String): Unit = { val realOrInvFile = "/commandFiles/snmpcmds." +runtype.trim // these files are under commandFiles folder, which I have to read. try { if (specificType.equalsIgnoreCase("Cisco")) { val specificDeviceFile: String = …