zipfs and relative paths
Alan Bateman
Alan.Bateman at Sun.COM
Mon Nov 16 14:01:39 PST 2009
Joel Uckelman wrote:
> :
> What about paths ending with '/' (which are not just equal to '/')? Right
> now, normalize() maps 'foo/' to itself. I would not expect an Path to
> contain redundant separators after a call to normalize. (This particular
> behavior is documented in the comment immediately preceding normalize().)
>
Path operations with the demo zip provider should be similar to the
default provider on Solaris/Linux so if you have access to either then
it should be easy to compare. So fs.getPath("foo/").toString() should
return "foo" and fs.getPath("foo/../../bar").normalize() should result
in a Path that represent "../bar". Another idea is look at
test/java/nio/file/Path/PathOps.java - that test exercises all of the
path operations and could be easily modified to verify the zip provider
(the sanity.sh test for the zip provider doesn't provide good coverage).
-Alan.
More information about the nio-dev
mailing list