User Tools



  • wild-pathname-p pathname &optional field-keygeneralized-boolean

Arguments and Values


wild-pathname-p tests pathname for the presence of wildcard components.

If pathname is a pathname (as returned by 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 nil, wild-pathname-p returns true if pathname has any wildcard components, nil if pathname has none. If field-key is non-nil, wild-pathname-p returns true if the indicated component of pathname is a wildcard, nil if the component is not a wildcard.


The following examples are not portable. They are written to run with particular file systems and particular wildcard conventions. Other implementations will behave differently. These examples are intended to be illustrative, not to be prescriptive.

(wild-pathname-p (make-pathname :name :wild))


(wild-pathname-p (make-pathname :name :wild) :name)


(wild-pathname-p (make-pathname :name :wild) :type)


(wild-pathname-p (pathname "s:>foo>>")) ; Lisp machines <r>true </r> (wild-pathname-p (pathname :name "F*O")) ; Most places <r>true </r> </blockquote> ====Affected By==== None. ====Exceptional Situations==== If pathname is not a pathname, a string, or a stream associated with a file an error of type type-error is signaled. ====See Also==== * System Class 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.