Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 67489 invoked from network); 9 Nov 2004 13:21:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Nov 2004 13:21:01 -0000 Received: (qmail 92189 invoked by uid 500); 9 Nov 2004 13:20:52 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 92123 invoked by uid 500); 9 Nov 2004 13:20:51 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 92107 invoked by uid 99); 9 Nov 2004 13:20:51 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [213.199.17.116] (HELO mail.iond.it) (213.199.17.116) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 09 Nov 2004 05:20:47 -0800 Received: from mmedia.iond.it (unknown [199.199.127.102]) by mail.iond.it (Postfix) with ESMTP id B45D363; Tue, 9 Nov 2004 14:20:40 +0100 (CET) From: info Reply-To: info@iond.it To: "Jakarta Commons Users List" Subject: Re: [VFS] How to resolve all local files relative to a chroot dir ? Date: Tue, 9 Nov 2004 14:20:38 +0100 User-Agent: KMail/1.6.2 References: <200411071442.50729.info@iond.it> <41908992.2090004@apache.org> In-Reply-To: <41908992.2090004@apache.org> Cc: Mario Ivankovits MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <200411091420.38502.info@iond.it> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Alle 10:10, marted=EC 9 novembre 2004, Mario Ivankovits ha scritto: > info wrote: >=20 > >is there anyone can give me some hints how to resolve all absolute > >and relative paths versus a chroot (jail) directory with VFS ? > > =20 > > > Looks like I was not quite true what I told you in my last post. >=20 > You can use the VirtualFileSystem to archive this behaviour: >=20 > FileSystemManager sm =3D VFS.getManager(); > FileObject fo =3D sm.resolveFile("file:/home/im/projects"); > FileObject foVirt =3D sm.createVirtualFileSystem(fo); >=20 > If you try to resolve using a relative Path outside "fo" you get an=20 > "FileSystemException: Invalid relative file name." >=20 > Hope this helps! >=20 Thanks Mario Tests of mine didn't work cause I used createFileSystem (only for zip, jar.= =2E.) Lucio --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org