JarUtilities

expect class JarUtilities

Some utilities used across ServerPackCreator, revolving around interacting with JAR-files.

Author

Griefed

actual class JarUtilities

Some utilities used across ServerPackCreator, revolving around interacting with JAR-files.

Author

Griefed

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun copyFileFromJar(fileToCopy: String, destinationFile: File, identifierClass: Class<*>): Boolean

Copy a file from inside our JAR-file to the host filesystem to the specified destination. The file will be created with exactly the same path specified in the parameter.

fun copyFileFromJar(fileToCopy: String, identifierClass: Class<*>, directory: String): Boolean

Copy a file from inside our JAR-file to the host filesystem. The file will be created with exactly the same path specified in the parameter.

fun copyFileFromJar(fileToCopy: String, destinationFile: File, replaceIfExists: Boolean, identifierClass: Class<*>)

Copy a file from inside our JAR-file to the host filesystem to the specified destination, replacing an already existing file. The file will be created with exactly the same path specified in the parameter.

fun copyFileFromJar(fileToCopy: String, replaceIfExists: Boolean, classToCopyFrom: Class<*>, directory: String)

Copy a file from inside our JAR-file to the host filesystem. The file will create exactly as specified in the parameter.

Link copied to clipboard
fun copyFolderFromJar(classToRetrieveHomeFor: Class<*>, directoryToCopy: String, destinationDirectory: String, jarDirectoryPrefix: String, fileEnding: Regex, tempDir: File = File(System.getProperty("java.io.tmpdir")))

Copy a folder from inside a JAR-file to the host filesystem. The specified folder will be copied, along with all resources inside it, recursively, to the specified destination.

Link copied to clipboard
fun jarInformation(classInJar: Class<*>): HashMap<String, String>

Retrieve information about the environment for the given class.