User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

====== Function WILD-PATHNAME-P ====== ====Syntax==== * **wild-pathname-p** //pathname// ''&optional'' //field-key// → //generalized-boolean// ====Arguments and Values==== * //pathname// - a //[[CL:Glossary:pathname designator]]//. * //field-key// - one of **'':host''**, **'':device''** **'':directory''**, **'':name''**, **'':type''**, **'':version''**, or **[[CL:Constant Variables:nil]]**. * //generalized-boolean// - a //[[CL:Glossary:generalized boolean]]//. ====Description==== **wild-pathname-p** tests //pathname// for the presence of wildcard components. If //pathname// is a //[[CL:Glossary:pathname]]// (as returned by **[[CL:Functions:pathname]]**) it represents the name used to open the file. This may be, but is not required to be, the actual name of the file. If //field-key// is not supplied or **[[CL:Constant Variables:nil]]**, **wild-pathname-p** returns true if //pathname// has any wildcard components, **[[CL:Constant Variables:nil]]** if //pathname// has none. If //field-key// is //[[CL:Glossary:non-nil]]//, **wild-pathname-p** returns true if the indicated component of //pathname// is a wildcard, **[[CL:Constant Variables:nil]]** if the component is not a wildcard. ====Examples==== The following examples are not //[[CL:Glossary:portable]]//. They are written to run with particular //[[CL:Glossary:file system|file systems]]// and particular //[[CL:Glossary:wildcard]]// conventions. Other //[[CL:Glossary:implementation|implementations]]// will behave differently. These examples are intended to be illustrative, not to be prescriptive. <blockquote> (wild-pathname-p ([[CL:Functions:make-pathname]] :name :wild)) <r>//[[CL:Glossary:true]]// </r> (wild-pathname-p ([[CL:Functions:make-pathname]] :name :wild) :name) <r>//[[CL:Glossary:true]]// </r> (wild-pathname-p ([[CL:Functions:make-pathname]] :name :wild) :type) <r>//[[CL:Glossary:false]]// </r> (wild-pathname-p ([[CL:Functions:pathname]] "s:>foo>**>")) ; Lisp machines <r>//[[CL:Glossary:true]]// </r> (wild-pathname-p ([[CL:Functions:pathname]] :name "F*O")) ; Most places <r>//[[CL:Glossary:true]]// </r> </blockquote> ====Affected By==== None. ====Exceptional Situations==== If //pathname// is not a //[[CL:Glossary:pathname]]//, a //[[CL:Glossary:string]]//, or a //[[CL:Glossary:stream associated with a file]]// an error of type **[[CL:Types:type-error]]** is signaled. ====See Also==== * **[[CL:Types:pathname|System Class PATHNAME]]** * **[[CL:Types:logical-pathname|System Class LOGICAL-PATHNAME]]** * {\secref\FileSystemConcepts} * {\secref\PathnamesAsFilenames} ====Notes==== Not all implementations support wildcards in all fields. see section {\secref\WildComponents}\ and \secref\WildcardRestrictions. \issue{PATHNAME-WILD:NEW-FUNCTIONS} \issue{PATHNAME-STREAM} \issue{PATHNAME-LOGICAL:ADD} \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}