(library(lists)), a relative filename or an absolute filename. The primary intention of this predicate is to resolve files specified as Alias(Relative). Option is a list of options to guide the conversion:
- List of file extensions to try. Default is
''. For each extension, absolute_file_name/3 will first add the extension and then verify the conditions imposed by the other options. If the condition fails, the next extension on the list is tried. Extensions may be specified both as
- Resolve the path relative to the given directory or the directory holding the given file. Without this option, paths are resolved relative to the working directory (see working_directory/2) or, if Spec is atomic and absolute_file_name/[2,3] is executed in a directive, it uses the current source file as reference.
- Imposes the condition access_file(File, Mode). Mode
is one of
none. See also access_file/2.
- Defines extensions. Current mapping:
['']. The file type
sourceis an alias for
prologfor compatibility with SICStus Prolog. See also prolog_file_type/2. This predicate only returns non-directories, unless the option
error(default), throw an
existence_errorexception if the file cannot be found. If
fail, stay silent.96Silent operation was the default up to version 3.2.6.
first(default), the predicate leaves no choice point. Otherwise a choice point will be left and backtracking may yield more solutions.
false) and Spec is atomic, call expand_file_name/2 followed by member/2 on Spec before proceeding. This is a SWI-Prolog extension.
The Prolog flag verbose_file_search
can be set to
true to help debugging Prolog's search for
This predicate is derived from Quintus Prolog. In Quintus Prolog, the
argument order was
absolute_file_name(+Spec, +Options, -Path).
The argument order has been changed for compatibility with ISO and
SICStus. The Quintus argument order is still accepted.