Chapter 20. Files

20.1. Dictionary
20.1.1. DIRECTORY
20.2. C Reference
Files C dictionary — Common Lisp and C equivalence

20.1. Dictionary

20.1.1. DIRECTORY

This function does not have any additional arguments other than the ones described in ANSI. To list files and directories, it follows the rules for matching pathnames described in Section 19.2. In short, you have the following practical examples:

Table 20.1. Examples of using DIRECTORY

ArgumentMeaning
"/home/jlr/*.*"List all files in directory /home/jlr/ Note that it lists only files, not directories!
"/home/jlr/*"Same as before, but only files without type.
"/home/jlr/*/"List all directories contained in /home/jlr/. Nested directories are not navigated.
"/home/jlr/**/*.*"List all files in all directories contained in /home/jlr/, recursively. Nested directories are navigated.