Re: Beagle handling of compressed files and man pages
- From: Edd Dumbill <edd usefulinc com>
- To: Jon Trowbridge <trow ximian com>
- Cc: Dashboard <dashboard-hackers gnome org>
- Subject: Re: Beagle handling of compressed files and man pages
- Date: Fri, 11 Jun 2004 10:43:52 +0100
On Mon, 2004-06-07 at 16:29 -0500, Jon Trowbridge wrote:
> On Mon, 2004-06-07 at 21:45 +0200, Michael Levy wrote:
> > how to "encode" an entry name in a URI or path.
> > If we are passing paths around then we need a way to identify the
> > specific entry of a multi-file archive....I may just be showing my
> > ignorance, but I don't know how to do this. Any ideas? For Gzip and Bzip
> > the point is moot (I think), but for Zip and Tar we'll probably want
> > something. If any one has ideas, I'd gladly remove PeekablStream.cs and
> > change IndexableCompressedFile. (would something like
> > "file:///path/to/file.gz?entry=entry/path/and/file/name" do the trick in
> > your opinion ?)
>
> Your guess is as good as mine. I think that using a file:// Uri for
> (non-archive) gzipped and bzipped files is fine. For zip and tar, what
> you propose seems very reasonable but they probably shouldn't start with
> file://. Maybe:
>
> tar://path/to/tarball.tar?entry=blah/blah/blah
> zip://path/to/zipfile.zip?entry=blah/blah/blah
>
> We'll probably want to special-case compressed archives, and assume that
> any code that handles tar:// Uris will know how to handle
>
> tar://path/to/compressed/tarball.tar.gz?entry=blah/blah/blah
In general, proliferating URI schemes is a bit excessive, and seems
troublesome adding one for each compression method you come across.
What you're saying is that a tarball or zip file can be a folder. Why
bother the user with implementation detail? Instead use
file:///path/to/tarball.tar/blah/blah/blah
file:///path/to/zipfile.zip/blah/blah/blah
This lets you keep perfectly the semantics of the / separator, and
avoids error prone special cases like "?entry="
Note also the three slashes at the start for localhost.
Per http://www.faqs.org/rfcs/rfc1738.html:
A file URL takes the form:
file://<host>/<path>
where <host> is the fully qualified domain name of the system on
which the <path> is accessible, and <path> is a hierarchical
directory path of the form <directory>/<directory>/.../<name>.
...
As a special case, <host> can be the string "localhost" or the empty
string; this is interpreted as `the machine from which the URL is
being interpreted'.
-- Edd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]