W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1999

Re: file:

From: Klaus Weide <kweide@tezcat.com>
Date: Fri, 29 Jan 1999 01:50:12 -0600 (CST)
To: www-lib@w3.org
Message-ID: <Pine.SUN.3.95.990129012837.23787A-100000@xochi.tezcat.com>
On Thu, 28 Jan 1999, Henrik Frystyk Nielsen wrote:

> At 15:54 1/28/99 -0500, Jim_Ravan@avid.com wrote:
> >What is the proper syntax for a file: scheme? I have seen
> >file:///dir/subdir/file, but I don't understand why there are three slashes
> >after the initial colon.

Because it's short for file://localhost/dir/subdir/file -
I.e. the string conforms to ge theneral syntax for absolute URLs,
it has a host component, but that happens to be an empty string.

Excerpt from RFC 1738:

   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'.

> >Is there anyway to know whether or not the user intends that the beginning
> >of the path is a physical disk? On a Mac, this matters. On Unix, it's not a
> >problem, obviously. I expect the answer is "no, other than server
> >convention".
> Yeah - what I do is using the HTLocalToWWW(...) function defined in
> 	http://www.w3.org/Library/src/HTWWWStr.html
> There also is a function to convert from URI format to local disk, it is
> defined in the same module.
> On windows the format is rather strange format which seems to work in most
> browsers:
> 	file:/C:/tmp/irc.txt

That should be regarded as just an incomplete form for

Lynx uses the forms with file://localhost/ as the primary internal
representation, and tries to convert other forms that may be encountered
to it.  If the Library has made a different decision, it should at least
regard the forms with explicit //localhost/ as equivalent.  (I haven't
checked whether it does.)

Received on Friday, 29 January 1999 02:50:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:49 UTC