public final class ModuleResources
extends java.lang.Object
Constructor and Description |
---|
ModuleResources(java.io.File moduleFile,
java.io.File dataFolder,
java.lang.ClassLoader classLoader)
Constructor for the class.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getResource(java.lang.String fileName)
Get the raw contents of an embedded resource within the module.
|
void |
saveResource(java.lang.String resourcePath)
Saves the raw contents of an embedded resource within the module.
|
public ModuleResources(java.io.File moduleFile, java.io.File dataFolder, java.lang.ClassLoader classLoader)
moduleFile
- The file of the module.dataFolder
- The data folder of the module.classLoader
- The class loader of the module.public void saveResource(java.lang.String resourcePath)
resourcePath
- Path to the resource to save.public java.io.InputStream getResource(java.lang.String fileName)
fileName
- The name of the resource to get contents of.