[jboss-user] [JBoss Microcontainer Development] New message: "Re: VFS3 and symlinks"

John Bailey do-not-reply at jboss.com
Fri Feb 26 15:07:51 EST 2010


User development,

A new message was posted in the thread "VFS3 and symlinks":

http://community.jboss.org/message/528890#528890

Author  : John Bailey
Profile : http://community.jboss.org/people/johnbailey

Message:
--------------------------------------------------------------
After discussing with Jason on IRC, it seems any behavior related to symbolic link support would really have to rely in the FileSystem instances.  The FileSystem instances may need to support symbolic links in different ways, or not at all.  Handling symbolic links in the VFS or VirtualFile classes would break certain functionality allowing FileSystems to be mounted at any path. 
 
Ex. 
  RealPath --> /real/path/to/archive.jar
  SymLinkedPath --> /link/to/archive.jar  ('link' is symlink to /real/path)
 
If you mount mount any FileSystem (maybe real, zip, assembled ...) at '/link' in the VFS, regardless of if it has anything to do with 'archive.jar', it would not be possible to get to  the contents of the FileSystem if you force paths to be canonical in the VFS or VirtualFile layer.  It would take the VFS path and convert it to the canonical path, and never get to the mounted FileSystem.  In essence, the FileSystem does not exist in the VFS.
 
What would make sense is if you asked a RealFileSystem for a specific path and it does the JDK File based canonical path conversion automatically.  There may not necessarily be any other FileSystem that supports it, but there is nothing stopping a specific FileSystem from adding support.
 
So I think it just makes sense to make sure we aren't switching between path types, and just leave it to the FileSystems to support it.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/528890#528890




More information about the jboss-user mailing list