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 = …