Not necessarely, absolute_file_name/3 might only cover this property:
- absolute_file_name(File): File is the absolute file name of PathName (section 8.26.1).
And not this property of GNU-Prologs file_property/2:
- real_file_name(File): File is the real file name of PathName (follows symbolic links).
These are two different concepts in operating systems.
Edit 13.10.2023
The documentation of SWI-Prolog absolute_file_name/3 has also this remark:
Various
Note that this predicate does not resolve symlinks to their actual canonical path.
For example on WSL2 SWI-Prolog absolute_file_name/2 doesn’t follow
any links. You can try yourself this easy scenario:
$ ls -la foo
f4.pl -> ../bar/f3.pl
$ ls -la bar
f3.pl
And now SWI-Prolog gives me:
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.4.2)
?- absolute_file_name('foo/f4.pl', X).
X = '/home/user/foo/f4.pl'.