The API

The basic operations the library will support will be getting a list of files in a directory and determining whether a file or directory with a given name exists. You’ll also write a function for recursively walking a directory hierarchy, calling a given function for each pathname in the tree.

In theory, these directory listing and file existence operations are already provided by the standard functions **DIRECTORY** and **PROBE-FILE**. However, as you’ll see, there are enough different ways to implement these functions—all within the bounds of valid interpretations of the language standard—that you’ll want to write new functions that provide a consistent behavior across implementations.