True when RelPath is Path, relative to RelTo. Path
and RelTo are first handed to absolute_file_name/2,
which makes the absolute
and canonical. Below are two examples:
?- relative_file_name('/home/janw/nice',
'/home/janw/deep/dir/file', Path).
Path = '../../nice'.
?- relative_file_name(Path, '/home/janw/deep/dir/file', '../../nice').
Path = '/home/janw/nice'.
| All | paths must be in canonical POSIX
notation, i.e., using / to separate segments in the path. See
prolog_to_os_filename/2. |
- bug
- This predicate is defined as a syntactical operation.