Re: <pathname-directory>/sub/dir



danb <sogwaldan@xxxxxxxxx> writes:

danb <sogwal...@xxxxxxxxx> writes:
How do you create a subdirectory of another pathname
directory?

On May 20, 8:21 am, Zach Beane <x...@xxxxxxxx> wrote:
(merge-pathnames #p"sub/dir/" existing-pathname)
(merge-pathnames (make-pathname :directory '(:relative "sub" "dir"))
existing-pathname)

Thanks, Zach. How portable is that, and are the
directory and namestring formats documented somewhere?

The second form should be highly portable, at least to lisp
implementations running on machines with hierarchical file systems.

The first form is less portable, since it assumes Unix-like syntax.

In general namestrings and the exact way that #P prints pathnames are
implementation dependent. There are, in fact, differences amongst lisp
implementations on Unix hosts in how they, for example interpret a
string like "/dir1/dir2/dir3" versus "/dir1/dir2/dir3/" when the last
element names a directory.

Pathname structures are documented in the CL spec. Namestring formats
would have to be documented in the implementation documentation.


--
Thomas A. Russ, USC/Information Sciences Institute
.



Relevant Pages

  • Re: Comparing lists
    ... The list implementations has been tweaked to produce better performance appending and popping. ... I find the Python docs surprisingly good for even commercial documentation. ... Once you decide that isn't good enough, the burden on creating the documentation is getting substantial, especially given that you've already spent the effort to write the code and tests for it. ... However, "experimenting" puts the cost on the person who derives the benefit, and is thus likely to not be done in a slipshod way. ...
    (comp.lang.python)
  • Re: Documentation strings for class-slots
    ... strings for individual slots specified in a defclass form, ... implementations might still provide debugging tools and/or ... Even MOP doesn't specify anything to retrieve the slot documentation: ...
    (comp.lang.lisp)
  • Re: Posting with XHR and ISO-8859-15
    ... implementations for every feature) and has got the endorsement of the ... It doesn't say in the documentation for IXMLHTTPRequest::sendeither. ... certainly not any Working Draft being referred to: ... attached the feature to the `ActiveXObject' constructor for many years, ...
    (comp.lang.javascript)
  • Re: random number
    ... implementations provide a new seed each time (probably ... You have to read the specific compiler's documentation ... the proper call is not portable since the ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)