mirror of
https://github.com/InsanusMokrassar/PsychomatrixBase.git
synced 2024-11-22 00:03:58 +00:00
fix load fun for different jvm
This commit is contained in:
parent
6c7d52c321
commit
a9b370d3bf
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions
|
||||
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.CeilDescriptions.models.CeilsDescriptionsRoot
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.load
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.FilesLoader.load
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import java.io.InputStreamReader
|
||||
|
@ -3,6 +3,9 @@ package com.github.insanusmokrassar.PsychomatrixBase.utils
|
||||
import java.io.FileInputStream
|
||||
import java.io.InputStream
|
||||
|
||||
object FilesLoader {
|
||||
@JvmStatic
|
||||
fun load(filename: String) : InputStream {
|
||||
return (ClassLoader.getSystemResourceAsStream(filename) ?: FileInputStream(filename))
|
||||
return (this::class.java.classLoader.getResourceAsStream(filename) ?: FileInputStream(filename))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user