in reply to syntax for URI of files?
URIs and URLs are not quite the same thing. URL is a special kind of URI that specifies a physical server that a document exists on. There are some protocols (such as Freenet (external link)) where a peice of data exists "out there", but you can't pinpoint an exact location. In such a case, you can't use URLs, but URIs work just fine.
Anyways, URI syntax for files is just 'file://' followed by the absolute path to the file. So an example of a Win32 file URI would be 'file://C:\windows'. On *nix, you get a horrid series of toothpicks: 'file:///usr/local' (though I've noticed that KDE assumes the begining slash on the filename, thus allowing 'file://usr/local').
Update: I forgot that ':' has special meaning in a URI. As another poster pointed out, a Win32 file URI should be 'file://C|\windows'.
----
Reinvent a rounder wheel.
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: syntax for URI of files?
by John M. Dlugosz (Monsignor) on Mar 06, 2003 at 16:30 UTC |