User Tools


Function DIRECTORY

Syntax

  • directory pathspec &key pathnames

Arguments and Values

Description

Determines which, if any, files that are present in the file system have names matching pathspec, and returns a fresh list of pathnames corresponding to the truenames of those files.

An implementation may be extended to accept implementation-defined keyword arguments to directory.

Examples

None.

Affected By

The host computer's file system.

Exceptional Situations

If the attempt to obtain a directory listing is not successful, an error of type file-error is signaled.

See Also

System Class PATHNAME, System Class LOGICAL-PATHNAME, Function ENSURE-DIRECTORIES-EXIST, {\secref\FileSystemConcepts}, {\secref\OpenAndClosedStreams},

{\secref\PathnamesAsFilenames}

Notes

If the pathspec is not wild, the resulting list will contain either zero or one elements.

Common Lisp specifies &key in the argument list to directory even though no standardized keyword arguments to directory are defined. :allow-other-keys t may be used in conforming programs in order to quietly ignore any additional keywords which are passed by the program but not supported by the implementation.

\issue{PATHNAME-LOGICAL:ADD} \issue{PATHNAME-LOGICAL:ADD} \issue{RESULT-LISTS-SHARED:SPECIFY} \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR} \issue{PATHNAME-LOGICAL:ADD} \issue{FILE-OPEN-ERROR:SIGNAL-FILE-ERROR}