Is there a Java library, which provides an abstraction layer over the file system and jar/zip. I checked apache common vfs but it does not support such operations as listing directory content and file rename for Jar/Zip.
Suppose there is some code, which uses java.io.File
and its friends to access files in the file system, and I need to make it work if these files are in Jar/Zip. I would like to find an API, which is very similar to java.io.File
, to make the code refactoring easier.
I haven't used it yet, but are you looking for the Zip File System Provider introduced in Java 7?
Zip File System Provider doesn't work as the abstraction layer exactly because of java.io.File:
The closest API I could find is TrueZIP/TrueVFS by Christian Schlichtherle https://truevfs.java.net/ but it has its own issues.