Subject: use of `host' part in pathnames
From: Erik Naggum <clerik@naggum.no>
Date: 1997/09/17
Newsgroups: comp.lang.lisp
Message-ID: <3083501692020493@naggum.no>


I have been looking for ways to use pathnames as an abstraction of network
file access as well as local files, which I believed was their intention.
I would primarily like to know how the designers of the pathname envisioned
the `host' part of pathnames be used.  secondarily, if what I have in mind
is not unreasonable, I'd like to know if anybody have implemented anything
that could be seen as a "virtual file system" underneath pathnames such
that one could plug in, say, HTTP, FTP, or some other/proprietary protocol
and associate them with hosts, or perhaps devices (which also don't seem to
have any use in today's pathnames, despite the tradition (on old DEC
systems at least), to use logical devices instead of logical hostnames).

what I have in mind is not unlike GNU Emacs' ange-ftp package, which,
through an astonishing amount of specific support in the C substrate,
manages to provide a means to preempt the internal, local file system
interface.  ange-ftp is based on recognizing a pattern in the filename,
specifically /[user@]hostname:[path], where []-parts are optional, but
this is clearly inferior to a standard, parsed pathname.

e.g., I would like a URL like http://www.naggum.no/emacs/index.html to be
equivalent to a pathname like that returned from the hypothetical call

    (make-pathname :host "www.naggum.no"
		   :device "http"
		   :directory '(:absolute "emacs")
		   :name "index"
		   :type "html")

and that _something_ would implement HTTP and GET the file if read or POST
it if written.  other file-system-like information can be read with HEAD.

ftp://ftp.gnu.ai.mit.edu/pub/gnu/emacs-20.1.tar.gz to become something like
that returned from the even more hypothetical

    (make-pathname :host "ftp.gnu.ai.mit.edu"
		   :device "ftp"
		   :directory '(:absolute "pub" "gnu")
		   :name "emacs-20.1"
		   :type "tar.gz")

and _something_ would implement FTP and retrieve the relevant information
about the file with stuff like SIZE and MDTM in addition the standard
RETRieve and STORe commands.

any ideas?

#\Erik
-- 
mainstreme, adj.  fanatically opposed to anything at all unusual