Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
根据 TrueZip 文档,该length()方法似乎返回 0 或 -1。我正在更新 WAR 存档,我只想更新长度已更改的文件。如何做到这一点?
length()
提前致谢,
马丁
首先,调用该方法TFile.umount()来提交任何更改。
TFile.umount()
然后使用下面的方法获取一个没有检测到归档文件的TFile并调用它的length()方法:
private static TFile newNonArchiveFile(TFile file) { return new TFile(file.getParentFile(), file.getName(), TArchiveDetector.NULL); }