我想使用 TrueZip 库将文件附加到现有存档(而不是通过 解包、添加文件并重新打包 - 新版本应该有这个 功能),但我觉得理解 API 有点困难。 可以请比我更有知识的人建议如何用几行代码来做到这一点吗?
最佳答案
Google 是您的 friend :
class MyApplication extends TApplication {
@Override
protected void setup() {
// This should obtain the global configuration.
TConfig config = TConfig.get();
// Set FsOutputOption.GROW for appending-to rather than reassembling an
// archive file.
config.setOutputPreferences(
config.getOutputPreferences.set(FsOutputOption.GROW));
}
...
}
关于java - 使用 TrueZip 将文件附加到 zip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9889629/