[英]append a file to zip using TrueZip
我想使用 TrueZip 庫將文件附加到現有存檔中(不是通過解包、添加文件和重新打包 - 新版本應該具有此功能),但我發現理解 API 有點困難。 可以請比我知識淵博的人建議如何在幾行中做到這一點嗎?
谷歌是你的朋友:
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));
}
...
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.