URI for nested zip files in Apache common -vfs?

I have a zip file (say, "inside.zip") inside another zip file (say, "outside.zip"). I use the Apache common-vfs2 Java library and provide uri as zip:file:///path/to/outside.zip to open the zip file. However, it cannot open the zip file that exists inside outside.zip, for example. he says that the file is not a folder and cannot find children in zip:file:///path/to/outside.zip!/inside.zip . What is the best way to use the library (I'm looking for the correct uri) so that I can open the zip file inside another zip file?

+4
source share
1 answer

After spending a day figuring this out, this is the correct URI: zip:zip:/path/to/outer.zip!/inner.zip!/

All of the following are not surprising:

  • zip:zip:/path/to/outer.zip!/inner.zip
  • zip:zip:/path/to/outer.zip!/inner.zip!
  • zip:/path/to/outer.zip!/inner.zip!/

Is there an RFC or standard grammar for this that I can find to avoid nasty errors like these?

+6
source

Source: https://habr.com/ru/post/1400921/


All Articles