You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mark Murphy <mm...@arroco.com> on 2005/08/18 01:32:39 UTC
[vfs] Referencing .zip files
I'm attempting to use the zip file system with VFS 1.0 RC3, and I can't
seem to get the URL definition right.
For a zip file that exists on the local file system, I have tried all of
the following:
zip:/shared/projects/foo/test.zip
zip:///shared/projects/foo/test.zip
zip:file:///shared/projects/foo/test.zip
zip://file:///shared/projects/foo/test.zip
For all of these, FileSystemManager::resolveFile(String strUrl) raises
the following exception:
org.apache.commons.vfs.FileSystemException: Could not find file with URI
"" because it is a relative path, and no base URI was provided
I know that VFS can get to the zip file itself, because this URL works:
/shared/projects/foo/test.zip
but, of course, only references it as a simple file, not as an archive.
I wanted to use VFS to get at the innards of the zip file.
Any tips? Outside of this, VFS has been working very nicely for me, and
I'm most appreciative of this component.
Thanks!
Mark Murphy
mmurphy@arroco.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] Referencing .zip files
Posted by Mark Murphy <mm...@arroco.com>.
Mario Ivankovits wrote:
>> I'm attempting to use the zip file system with VFS 1.0 RC3, and I
>> can't seem to get the URL definition right.
>>
>> zip:/shared/projects/foo/test.zip
>
> The magic is to append a "!".
>
> zip:/shared/projects/foo/test.zip!/
Aha!
Or, rather, zip:Aha!/
;-)
Works like a champ. Thanks!
Mark Murphy
mmurphy@arroco.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [vfs] Referencing .zip files
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Mark!
> I'm attempting to use the zip file system with VFS 1.0 RC3, and I
> can't seem to get the URL definition right.
>
> zip:/shared/projects/foo/test.zip
The magic is to append a "!".
zip:/shared/projects/foo/test.zip!/
Currently VFS needs to know where to find the "inner" and "outer" part
of the url. Looks like an side-effect of one of my filename parsing
changes .
I fixed it, the next nightly should be able to handle zip-filenames as
documented again.
> Outside of this, VFS has been working very nicely for me, and I'm most
> appreciative of this component.
Thanks!
Ciao,
Mario