- recursive(+Boolean)
- If
true
(defaultfalse
), recurse into subdirectories - follow_links(+Boolean)
- If
true
(default), follow symbolic links. - file_type(+Type)
- See absolute_file_name/3.
- extensions(+List)
- Only return entries whose extension appears in List.
- file_errors(+Errors)
- How to handle errors. One of
fail
,warning
orerror
. Default iswarning
. Errors notably happen if a directory is unreadable or a link points nowhere. - access(+Access)
- Only return entries with Access
- matches(+GlobPattern)
- Only return files that match GlobPattern.
- exclude(+GlobPattern)
- Exclude files matching GlobPattern.
- exclude_directory(+GlobPattern)
- Do not recurse into directories matching GlobPattern.
- hidden(+Boolean)
- If
true
(default), also return hidden files.
This predicate is safe against cycles introduced by symbolic links to directories.
The idea for a non-deterministic file search predicate comes from Nicos Angelopoulos.