我正在编写一个函数,需要访问资源中的文件夹,并循环遍历所有文件名,如果这些文件符合条件,则加载这些文件。
new File(getClass.getResource("/images/sprites").getPath).listFiles()
返回空指针异常,其中目录树遵循Resources -> images -> sprites ->
请有人指出我正确的方向吗?
java resources scala
java ×1
resources ×1
scala ×1