stefanofornari / vfs2nio

Library that bridges Commons VFS 2 to Java's NIO.2 virtual file system
Other
0 stars 0 forks source link

Vfs2NioPath.getAbsolutePath() should contain the pathname of the archive #1

Closed stefanofornari closed 8 months ago

stefanofornari commented 10 months ago

When representing a path of a file into an archive (using for instance vfs:tar) getAbsolutePath() should include the archive pathname:

Path p = Paths.get(URI.create("vfs:tar:///tmp/archive.tar);
p.getAbsolutePath() -> /tmp/archive.tar!/

for a file dir/subdir/file.txt inside archive.tar:

p.getAbsolutePath() -> /tmp/archive.tar!/dir/subdir/file.txt

stefanofornari commented 8 months ago

After thinking more about it, given that the archive name is the file system, not a root folder, returning the path itself is correct.