commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [VFS] How to resolve all local files relative to a chroot dir ?
Date Tue, 09 Nov 2004 09:10:42 GMT
info wrote:

>is there anyone can give me some hints how to resolve all absolute
>and relative paths versus a chroot (jail) directory with VFS ?
Looks like I was not quite true what I told you in my last post.

You can use the VirtualFileSystem to archive this behaviour:

        FileSystemManager sm = VFS.getManager();
        FileObject fo = sm.resolveFile("file:/home/im/projects");
        FileObject foVirt = sm.createVirtualFileSystem(fo);

If you try to resolve using a relative Path outside "fo" you get an 
"FileSystemException: Invalid relative file name."

Hope this helps!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message