Subject: Re: namestring to pathname and back
From: Erik Naggum <>
Date: 1999/08/22
Newsgroups: comp.lang.lisp
Message-ID: <>

* Vassil Nikolov <>
| Now, the question is, can I be sure that this second string would be
| identical to the first string that was passed to CL:OPEN?

  there is an infinite number of strings that name exactly the same file
  under Unix.  I don't think it is even remotely reasonable to expect that
  the same filename will be returned from a function that has to figure out
  the full pathname corresponding to a filename.  after all, the operating
  systems doesn't even _know_ the filename -- all it cares about is a
  device and an inode number.  now, if the operating system actually knew
  the filename, or even the full pathname, you could ask it and get back a
  value that you could ask your question about.  lacking such functionality
  in all Unixen, your question is implementationally meaningless.

  there is also an infinite number of namestrings that may be parsed into
  the same pathname and vice versa, so there cannot be such a guarantee in
  the general case.

  the interesting questions are (1) for which namestrings and pathnames
  there exists a guarantee, and (2) whether such a guarantee can be
  established algorithmically for a given namestring without actually
  consulting the operating system.

  (defun pringles (chips)
    (loop (pop chips)))