Re: <pathname-directory>/sub/dir
- From: tar@xxxxxxxxxxxxx (Thomas A. Russ)
- Date: 20 May 2008 09:58:26 -0700
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
.
- References:
- <pathname-directory>/sub/dir
- From: danb
- Re: <pathname-directory>/sub/dir
- From: Zach Beane
- Re: <pathname-directory>/sub/dir
- From: danb
- <pathname-directory>/sub/dir
- Prev by Date: Re: Search path program
- Next by Date: Re: List diagrams -- Siebel and Touretzky draw them differently
- Previous by thread: Re: <pathname-directory>/sub/dir
- Next by thread: Re: <pathname-directory>/sub/dir
- Index(es):
Relevant Pages
|