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 07:06:59 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 ?
Currently VFS do not provide a "chroot" functionallity.

The only thing you can do is setting a "baseFile" on the FileSystemManager.

        StandardFileSystemManager sm = new StandardFileSystemManager();
        sm.setBaseFile(new File("/home/im"));
        FileObject fo = sm.resolveFile("projects");

Now the resolveFile resolves by taking the baseFile into account, but 
the user can break out of the jail.


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

View raw message