使用TrueZip将文件附加到zip [英] append a file to zip using TrueZip
本文介绍了使用TrueZip将文件附加到zip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用TrueZip库将文件追加到现有存档中(不是通过 解压缩,添加文件并重新打包-新版本应该具有此功能 功能),但我很难理解API. 能不能请比我更精通的人提出几行建议呢?
I want to use the TrueZip library to append a file to an existing archive (not by unpacking, adding a file and repacking - the new versions are supposed to have this feature), but I find it a bit difficult to understand the API. Can please someone, more knowledgeable than me, suggest how to do this in a few lines?
推荐答案
Google是您的朋友:
Google is your 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));
}
...
}
这篇关于使用TrueZip将文件附加到zip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文