commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From info <i...@iond.it>
Subject Re: [VFS] How to resolve all local files relative to a chroot dir ?
Date Tue, 09 Nov 2004 13:20:38 GMT
Alle 10:10, martedì 9 novembre 2004, Mario Ivankovits ha scritto:
> 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!
> 

Thanks Mario

Tests of mine didn't work cause I used createFileSystem (only for zip, jar...)

Lucio

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message