且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有一种独立于平台的方式以编程方式从zip / jar中删除文件?

更新时间:2023-10-16 11:31:34

是的!使用 TrueZip


TrueZIP是一个基于Java的虚拟文件系统(VFS),它使客户端应用程序能够对存档文件执行CRUD(创建,读取,更新,删除)操作,就像它们是虚拟目录一样,即使在多线程环境中使用嵌套存档文件也是如此。 p>

TrueZIP is a Java based virtual file system (VFS) which enables client applications to perform CRUD (Create, Read, Update, Delete) operations on archive files as if they were virtual directories, even with nested archive files in multithreaded environments.

完全理解API需要一些工作,但是一旦你这样做,你会看到它的使用非常简单适用于涉及压缩文件的各种任务。

It takes a little bit of work to fully grok the API, but once you do, you'll see how fantastically easy it is to use for all sorts of tasks involving compressed files.