How to read files from resources folder in Scala?
问题 I have a folder structure like below: - main -- java -- resources -- scalaresources --- commandFiles and in that folders I have my files that I have to read. Here is the code: 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 = "