60 lines
8.3 KiB
HTML
60 lines
8.3 KiB
HTML
|
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>CLHS: Section 19.2.2.4.3</TITLE>
|
||
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
||
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
||
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
||
|
<LINK REL=TOP HREF="../Front/index.htm">
|
||
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
||
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
||
|
<LINK REL=PREV HREF="19_bbdb.htm">
|
||
|
<LINK REL=UP HREF="19_bbd.htm">
|
||
|
<LINK REL=NEXT HREF="19_bbdca.htm">
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="19_bbdb.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="19_bbd.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="19_bbdca.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
||
|
|
||
|
<HR>
|
||
|
|
||
|
<H2>
|
||
|
19.2.2.4.3 Restrictions on Examining a Pathname Directory Component</H2> <P>
|
||
|
The directory might be a <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>string</I></A>, <TT>:wild</TT>, <TT>:unspecific</TT>, or <A REL=DEFINITION HREF="a_nil.htm#nil"><B>nil</B></A>. <P>
|
||
|
The directory can be a <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> of <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>strings</I></A> and <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A>. The <A REL=DEFINITION HREF="26_glo_c.htm#car"><I>car</I></A> of the <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> is one of the symbols <TT>:absolute</TT> or <TT>:relative</TT>, meaning: <P>
|
||
|
<P><DL><P>
|
||
|
<DT><TT>:absolute</TT> <P><DD>
|
||
|
A <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> whose <A REL=DEFINITION HREF="26_glo_c.htm#car"><I>car</I></A> is the symbol <TT>:absolute</TT> represents a directory path starting from the root directory. The list <TT>(:absolute)</TT> represents the root directory. The list <TT>(:absolute "foo" "bar" "baz")</TT> represents the directory called <TT>"/foo/bar/baz"</TT> in Unix (except possibly for <A REL=DEFINITION HREF="26_glo_c.htm#case"><I>case</I></A>). <P>
|
||
|
<DT><TT>:relative</TT> <P><DD>
|
||
|
A <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> whose <A REL=DEFINITION HREF="26_glo_c.htm#car"><I>car</I></A> is the symbol <TT>:relative</TT> represents a directory path starting from a default directory. The list <TT>(:relative)</TT> has the same meaning as <A REL=DEFINITION HREF="a_nil.htm#nil"><B>nil</B></A> and hence is not used. The list <TT>(:relative "foo" "bar")</TT> represents the directory named <TT>"bar"</TT> in the directory named <TT>"foo"</TT> in the default directory. <P>
|
||
|
<P></DL><P>
|
||
|
Each remaining element of the <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> is a <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>string</I></A> or a <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A>. <P>
|
||
|
Each <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>string</I></A> names a single level of directory structure. The <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>strings</I></A> should contain only the directory names themselves---no punctuation characters. <P>
|
||
|
In place of a <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>string</I></A>, at any point in the <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A>, <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> can occur to indicate special file notations. The next figure lists the <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> that have standard meanings. Implementations are permitted to add additional <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> of any <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> that is disjoint from <A REL=DEFINITION HREF="t_string.htm#string"><B>string</B></A> if necessary to represent features of their file systems that cannot be represented with the standard <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>strings</I></A> and <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A>. <P>
|
||
|
Supplying any non-<A REL=DEFINITION HREF="26_glo_s.htm#string"><I>string</I></A>, including any of the <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> listed below, to a file system for which it does not make sense signals an error of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="e_file_e.htm#file-error"><B>file-error</B></A>. For example, Unix does not support <TT>:wild-inferiors</TT> in most implementations. <P>
|
||
|
<PRE>
|
||
|
Symbol Meaning
|
||
|
:wild Wildcard match of one level of directory structure
|
||
|
:wild-inferiors Wildcard match of any number of directory levels
|
||
|
:up Go upward in directory structure (semantic)
|
||
|
:back Go upward in directory structure (syntactic)
|
||
|
</PRE>
|
||
|
<P><B>Figure 19-3. Special Markers In Directory Component</B> <P>
|
||
|
The following notes apply to the previous figure: <P>
|
||
|
<P><DL><DT>Invalid Combinations <P><DD>
|
||
|
Using <TT>:absolute</TT> or <TT>:wild-inferiors</TT> immediately followed by <TT>:up</TT> or <TT>:back</TT> signals an error of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="e_file_e.htm#file-error"><B>file-error</B></A>. <P>
|
||
|
<DT>Syntactic vs Semantic <P><DD>
|
||
|
``Syntactic'' means that the action of <TT>:back</TT> depends only on the <A REL=DEFINITION HREF="26_glo_p.htm#pathname"><I>pathname</I></A> and not on the contents of the file system. <P>
|
||
|
``Semantic'' means that the action of <TT>:up</TT> depends on the contents of the file system; to resolve a <A REL=DEFINITION HREF="26_glo_p.htm#pathname"><I>pathname</I></A> containing <TT>:up</TT> to a <A REL=DEFINITION HREF="26_glo_p.htm#pathname"><I>pathname</I></A> whose directory component contains only <TT>:absolute</TT> and <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>strings</I></A> requires probing the file system. <P>
|
||
|
<TT>:up</TT> differs from <TT>:back</TT> only in file systems that support multiple names for directories, perhaps via symbolic links. For example, suppose that there is a directory <TT>(:absolute "X" "Y" "Z")</TT> linked to <TT>(:absolute "A" "B" "C")</TT> and there also exist directories <TT>(:absolute "A" "B" "Q")</TT> and <TT>(:absolute "X" "Y" "Q")</TT>. Then <TT>(:absolute "X" "Y" "Z" :up "Q")</TT> designates <TT>(:absolute "A" "B" "Q")</TT> while <TT>(:absolute "X" "Y" "Z" :back "Q")</TT> designates <TT>(:absolute "X" "Y" "Q")</TT> <P></DL><P>
|
||
|
<P>
|
||
|
|
||
|
|
||
|
<A REL=CHILD HREF="19_bbdca.htm"><H2>
|
||
|
19.2.2.4.3.1 Directory Components in Non-Hierarchical File Systems</H2></A><P><P><HR>The following <A REL=META HREF="../Front/X3J13Iss.htm">X3J13 cleanup issue</A>, <I>not part of the specification</I>, applies to this section:<P><UL><LI> <A REL=CHILD HREF="../Issues/iss263.htm">PATHNAME-SUBDIRECTORY-LIST:NEW-REPRESENTATION</A><P></UL><HR>
|
||
|
|
||
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
||
|
|
||
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
||
|
</BODY>
|
||
|
</HTML>
|