copy File From Jar
Copy a file from inside our JAR-file to the host filesystem. The file will create exactly as specified in the parameter.
Example:
copyFileFromJar(File("log4j2.xml"))
will result in the log4j2.xml file from inside the JAR-file to be copied to the outside of the JAR-file aslog4j2.xml
Author
Griefed
Parameters
The source-file in the JAR you wish to copy outside the JAR.
Whether to replace the file, if it already exists.
The class of the JAR from which you want to copy from.
The directory where the file should be copied to.
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.
Example:
copyFileFromJar(File("log4j2.xml"))
will result in the log4j2.xml file from inside the JAR-file to be copied to the outside of the JAR-file aslog4j2.xml
Return
true
if the file was created, false
otherwise.
Author
Griefed
Parameters
The source-file in the JAR you wish to copy outside the JAR.
The class of the JAR from which to get the resource.
The directory to copy the file to.
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.
Example:
copyFileFromJar(File("log4j2.xml"))
will result in the log4j2.xml file from inside the JAR-file to be copied to the outside of the JAR-file aslog4j2.xml
Author
Griefed
Parameters
The source-file in the JAR you wish to copy outside the JAR.
The file to which to copy to.
The class of the JAR from which to get the resource.
Whether to replace the file, if it already exists.
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.
Example:
copyFileFromJar(File("log4j2.xml"))
will result in the log4j2.xml file from inside the JAR-file to be copied to the outside of the JAR-file aslog4j2.xml
Return
true
if the file was created, false
otherwise.
Author
Griefed
Parameters
The source-file in the JAR you wish to copy outside the JAR.
The class of the JAR from which to get the resource.
The file to which to copy to.