zipfs - create = true should create parent dirs too?

Jaikiran Pai jai.forums2013 at gmail.com
Fri Nov 22 12:10:06 UTC 2019


The ZipFileSystemProvider states in this doc[1] that the "create"
property with a value "true", creates the zip file if it's not present,
when FileSystems.newFileSystem the API is used. However, it doesn't say
anything about the parent directories of the Path that's passed as the
zip file path. Imagine something like /tmp/non-existent/newzip.jar as
the Path that gets passed to the FileSystems.newFileSystem with "create"
= "true". What's the expected semantics here for zipfs? Should it be
expected to even create the non-existent parent dir(s)?

Right now, the implementation fails with a NoSuchFileException due to
the missing parent dir.

On a related note, is there any public documentation of zipfs and its
properties post Java 8 release? I couldn't find anything in the javadocs
or other places for this.


[1]
https://docs.oracle.com/javase/8/docs/technotes/guides/io/fsp/zipfilesystemproviderprops.html

-Jaikiran




More information about the nio-dev mailing list