scamper problem

goran.krampe at bluefish.se goran.krampe at bluefish.se
Thu Mar 3 14:31:35 UTC 2005


Brian Brown <rbb at techgame.net> wrote:
> Try putting one extra '/' after the uri:
> 
> file:///path/file.html
> 
> otherwise your 'path' part would have to be relative to FileDirectory 
> default. If it is relative, I'm not sure :-)

Eh... no. :) Or rather - yes - you need an extra slash *always* - but no
- it doesn't make the path "absolute" or anything, it just separates the
path from the host.
This is the syntax for a file URL:

	file://<host>/<absolutepathtofile>

You may omit <host> implying "localhost" (thus getting 3 slashes in a
row), but that is it. The path is always absolute according to the
standard, but in Squeak you can still tell the URL if it should be
interpreted as absolute or as relative to FileDirectory default. Check
class comment of FileUrl and also the UrlTest class.

regards, Göran

PS. I worked hard on getting FileUrl correct, and I think and hope it
is. :)



More information about the Squeak-dev mailing list