Path -> URI -> Path round trip fails for lazily created zip file systems
Alan Bateman
Alan.Bateman at oracle.com
Mon Dec 30 13:23:41 PST 2013
On 30/12/2013 18:38, Xueming Shen wrote:
> The spec does not appears to care where the new file should be
> created. I would take this
> as an implementation details. Either way is fine, but inside
> ZipFileSystem's constructor
> would be more "convenient", personally.
The spec has to allow for very varied provider implementations so this
is why it is up to the implementation whether FileSystemProvider#getPath
can create the FileSystem or not. There will be cases where the
FileSystem is just a mirror to a remote file system for example. In any
case, for the zip provider then I agree, it would be best for it to be
created by the constructor (and have FileSystemProvider#getPath fail
with FileSystemNotFoundException if it does not exist).
-Alan.
More information about the nio-dev
mailing list