Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 11798 invoked from network); 8 Feb 2005 16:46:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Feb 2005 16:46:08 -0000 Received: (qmail 37383 invoked by uid 500); 8 Feb 2005 16:46:05 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 37277 invoked by uid 500); 8 Feb 2005 16:46:05 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 37258 invoked by uid 99); 8 Feb 2005 16:46:04 -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 includes SPF record at spf.trusted-forwarder.org) Received: from smtp005.mail.ukl.yahoo.com (HELO smtp005.mail.ukl.yahoo.com) (217.12.11.36) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 08 Feb 2005 08:46:03 -0800 Received: from unknown (HELO PORTSRAULT) (ksbrault@82.252.216.136 with login) by smtp005.mail.ukl.yahoo.com with SMTP; 8 Feb 2005 16:46:00 -0000 From: =?iso-8859-1?Q?St=E9phane_Rault?= To: "'Jakarta Commons Developers List'" Subject: RE : RE : [VFS] Problem with Zip files Date: Tue, 8 Feb 2005 17:46:00 +0100 Message-ID: <000001c50dfd$abb7e5d0$0300a8c0@PORTSRAULT> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: <4208EAC4.3070603@imapmail.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Unfortunately, you're wrong :=20 I've put=20 FileObject fileZip =3D manager.resolveFile("zip:///c:\\temp\\toto.zip"); And I got : org.apache.commons.vfs.FileSystemException: Could not find file with URI "///c:\temp\toto.zip" because it is a relative path, and no base URI was provided. -----Message d'origine----- De : Rob Oxspring [mailto:roxspring@imapmail.org]=20 Envoy=E9 : mardi 8 f=E9vrier 2005 17:37 =C0 : Jakarta Commons Developers List Objet : Re: RE : [VFS] Problem with Zip files I haven't used vfs (yet) but I'm pretty sure the the file url should = have 3=20 slashes: "file:///c:/temp/toto.zip" because urls reserve the spot between slash 2 and 3 for a host/port. Rob St=E9phane Rault wrote: > XmlBeans doesn't matter in any way in my problem. Sorry for the=20 > confusion !! >=20 > But my real problem with Zip file is still alive :-( >=20 > Here is the stack trace of the exception catched : >=20 > org.apache.commons.vfs.FileSystemException: Could not replicate=20 > "file://c:/temp/toto.zip" as it does not exist. > at=20 > org.apache.commons.vfs.provider.AbstractFileSystem.replicateFile(Abstr > actFil > eSystem.java:310) > at > org.apache.commons.vfs.provider.zip.ZipFileSystem.(ZipFileSystem.ja= va: > 59) > at > org.apache.commons.vfs.provider.zip.ZipFileProvider.doCreateFileSystem(Zi= pFi > leProvider.java:83) > at > org.apache.commons.vfs.provider.AbstractLayeredFileProvider.createFileSys= tem > (AbstractLayeredFileProvider.java:77) > at > org.apache.commons.vfs.provider.AbstractLayeredFileProvider.findFile(Abst= rac > tLayeredFileProvider.java:57) > at > org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultF= ile > SystemManager.java:505) > at > org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultF= ile > SystemManager.java:483) > at > org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultF= ile > SystemManager.java:453) > at test.FileTest.test6(FileTest.java:154) > at test.FileTest.main(FileTest.java:37) >=20 > In the API, resolveFile may worked even with file which doesn't exist=20 > (Am I wrong ?) >=20 >=20 > -----Message d'origine----- > De : St=E9phane Rault [mailto:ksbrault@yahoo.fr] > Envoy=E9 : mardi 8 f=E9vrier 2005 08:43 > =C0 : commons-dev@jakarta.apache.org > Objet : [VFS] Problem with Zip files >=20 >=20 > I've a problem accessing Zip files with VFS API. I'm using XmlBeans V2 = > (cause of a bug in V1) compiled the 10 jan 2005. >=20 > Here is my sample code : >=20 > try { > =20 > StandardFileSystemManager manager =3D new=20 > StandardFileSystemManager(); > manager.setFilesCache(new SoftRefFilesCache()); > manager.init(); > =20 > // toto.txt doesn't exist in the folder > FileObject fileTxt =3D manager.resolveFile("c:\\temp\\toto.txt"); > System.out.println("File Text works !!"); > =20 > // toto.zip doesn't exist in the folder > FileObject fileZip =3D=20 > manager.resolveFile("zip://c:\\temp\\toto.zip"); > System.out.println("File Zip works !!"); > =20 > // The file and the folder don't exist > FileObject fileInUnknownFolder =3D=20 > manager.resolveFile("c:\\notPresentFolder\\toto.txt"); > System.out.println("File in unknown Folder works !!"); > =20 > } catch (Throwable t) { >=20 > System.out.println("It doesn't work !!"); > } >=20 > And here is the output : >=20 > File Text works !! > It doesn't work !! >=20 > Note that c:\\temp is an existing directory. >=20 > Thanks in advance for your help... >=20 > St=E9phane. >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org