next up previous contents
Next: 2.14.2 File Name Completion Up: 2.14 Filesystem Operations Previous: 2.14 Filesystem Operations

2.14.1 Wildcard Matching

 

Unix filesystem operations such as open will accept wildcard pathnames that match a single file (of course, directory allows any number of matches.) Filesystem operations treat :wild-inferiors the same as\ :wild.

[Function]
directory wildname &key :all :check-for-subdirs :follow-links

The keyword arguments to this Common Lisp function are a CMU extension. The arguments (all default to t) have the following functions:

:all
Include files beginning with dot such as `.login', similar to ``ls -a''.

:check-for-subdirs
Test whether files are directories, similar to ``ls -F''.

:follow-links
Call truename on each file, which expands out all symbolic links. Note that this option can easily result in pathnames being returned which have a different directory from the one in the wildname argument.

[Function]
extensions:print-directory wildname &optional stream &key :all :verbose :return-list

Print a directory of wildname listing to stream (default *standard-output*.) :all and :verbose both default to nil and correspond to the ``-a'' and ``-l'' options of `ls'. Normally this function returns nil, but if :return-list is true, a list of the matched pathnames are returned.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997