Introduces a brand-new API and implements, aiming to provide a more stability and extensible experience.
Changes between v0.2.x:
- The following classes should be replaced to the new interface.
old | new |
---|---|
ResourcesPackage | ResourcePackage |
ResFile | ResourceFile |
ResDir | ResourceDirectory |
The methods should be replaced to the new methods in the new interfaces. Most methods have no big naming changes, you should change it easily.
-
Getting a new resource package should use
ResourcePackage#get(...)
instead ofnew ResourcePackage(...)
, and you should use a identifer file to locate your package. Using a identifier file with unique name should no longer meets conflicts when using many jars that have the same resource dirs. And you will no longer need to provide your class as a identifier (we also not recommend this due to many problems using class). -
The
ResourcePackage
now will always use the root directory of classpath, instead of you can only use a one-level directory as root (due to v0.2.x bugs). -
The
extract
method inResDir
is removed. You may only implement it by yourself usinglistFiles
methods. We may implement it again sooner or later.