function fills directory_listing
, a string list, with the paths of files and directories located in a directory specified by the string expression directory_name
. (A list is a read-only variable-length array
. The number of files and directories returned can be accessed via the length
function.) A wildcard filter can be passed as an optional third string expression, wildcard_filter
. An optional fourth argument, recursive
, instructs the function to create a listing of the specified directory as well as any subdirectories. All file and directory names will be fully-qualified; i.e., they will be absolute, not relative, path names.
The function returns a logical value of 1 (true) if successful and 0 (false) if the directory does not exist or cannot be accessed.