pathnames [Re: files, printers, etc. [Re: The feel of a
LispM/List of running machines]]
Rainer Joswig
joswig@lavielle.com
Sat, 3 May 1997 22:46:22 +0200
At 14:44 Uhr -0500 3.5.1997, cwg@DeepEddy.Com wrote:
>I was just thinking that in the area of pathnames, we clearly need to
include
>the one universal standard: the URL.
>
>What we need is a lispy equivalent to the URL.
>
>A URL contains 4 parts:
>
> protocol
> hostname
> path
> filename
>
>
>It then has all that ugly syntax in order to allow different parts of
the URL
>to be merged in a unix-like manner.
>
>Clearly, an object which has those four fields would be a more lispy
way to do
>this. Also, you could generate a path object by parsing a URL like
this:
>
> (parse-url "http://www.somehere.com/path/file.ext")
You mean like in CL-HTTP?
? <bold>(</bold>url:parse-url<bold>
"http://www.lavielle.com/~joswig/lisp.html")
</bold>#<<HTTP-OBJECT http://www.lavielle.com/~joswig/lisp.html
#x2E4B1CE>
:INTERNED
? <bold>(describe *)
</bold>#<<HTTP-OBJECT http://www.lavielle.com/~joswig/lisp.html
#x2E4B1CE>
Class: #<<STANDARD-CLASS URL:HTTP-OBJECT>
Wrapper: #<<CCL::CLASS-WRAPPER URL:HTTP-OBJECT #x2CD9EFE>
Instance slots
HTTP::PLIST: NIL
URL:DISPLAY-STRING: NIL
URL:NAME-STRING: "http://www.lavielle.com/~joswig/lisp.html"
URL:LANGUAGES: NIL
URL:AUTHENTICATION-REALM: NIL
URL:CAPABILITIES: NIL
URL:SECURE-SUBNETS: NIL
URL:EXPIRATION-FUNCTION: NIL
URL:MAX-AGE-FUNCTION: NIL
URL::DIRECTIVES: NIL
URL:HOST-STRING: "www.lavielle.com"
URL:HOST-OBJECT: 3258979647
URL:PORT: NIL
URL::ORIGIN-CLASS: URL:HTTP-OBJECT
URL:TRANSLATION-METHOD: NIL
URL:PATH: ("~joswig")
URL:OBJECT: "lisp"
URL:EXTENSION: "html"
PATHNAME: NIL
URL::URLS: NIL
Class slots
URL:SCHEME: "http"
Rainer Joswig, Lavielle EDV Systemberatung GmbH & Co, Lotharstrasse 2b,
D22041
Hamburg, Tel: +49 40 658088, Fax: +49 40 65808-202,
Email: joswig@lavielle.com , WWW: http://www.lavielle.com/~joswig/