12.2. Dictionary

12.2.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 11.2. In short, you have the following practical examples:

Table 12.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.