{dir $path} lists the names in a directory as its data, one occurrence per entry with the name in {$dir} - . and .. left out, the others sorted as PHP's scandir sorts them. Files and directories come alike, hidden ones too, and nothing below is scanned.

The path is used as given, so build it from the APP or DATA constant - a relative path is read from the server's working directory, which differs between the web server and the command line. It must lie inside the applications, the engine or DATA. A directory that is not there is an error under the strict check, an empty list without it.

{files} does the same with a base, masks, recursion and a field per entry.