Package io.deephaven.enterprise.test
Class UnpackUtils
java.lang.Object
io.deephaven.enterprise.test.UnpackUtils
We would like to be able to put all of the test data files in one package and reuse them. Unfortunately, you can't
directly reference them on the classpath directly unless they are in the same module as the test runs from.
A simple solution to this is to locate the jar containing the files using the classloader, then unpack them to a
temporary location on disk that can be directly referenced. This does that
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UnpackUtils
public UnpackUtils()
-
-
Method Details
-
unpackTo
Locate the specified resource on the classpath and unpack it onto the filesystem at the specified path.- Parameters:
resourcePath
- the resource to unpackunpackDir
- the location to unpack it to.- Throws:
IOException
- if it doesn't work.
-