« Return to Thread: Generating absolute path

Generating absolute path

by Bernd Gutmann-3 :: Rate this Message:

Reply to Author | View in Thread

Hi.

I need to find out the absolute path given a path, for instance

./myfile.pl  ==>> /dir1/dir2/myfile.pl
../otherfile.pl ==>> /dir1/otherfile.pl
./folder/file42.txt ==>>  /dir1/dir2/folder/file42.txt
...

I looked in the documentation of YAP, and found this predicate:

prolog_file_name(+Name,-FullPath )
Unify FullPath with the absolute path YAP would use to consult file  
Name.

However, YAP tells me that this predicate doesn't exist. And the  
documentation doesn't say that this predicate is in a library, so I  
assume it's built in and thus should be available.
I also ran find on the YAP source folder, but no file except yap.tex/
yap.pdf/yap.html contains the string "prolog_file_name".

Here are my questions:
Does prolog_file_name/2 really exist? If yes, will it do what I need?
If no, is there another way to get what I need?

I'm using the GIT version of Yap-5.1.4.


Kind Regards
Bernd


-------------------------------------------------------------------------------
Bernd Gutmann <Bernd.Gutmann@...>
Dept. of Computer Science
Katholieke Universiteit Leuven
Phone: +32 16 32 7576
Skype: kopoltra
http://www.cs.kuleuven.be/~bernd
-------------------------------------------------------------------------------

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html







------------------------------------------------------------------------------
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

 « Return to Thread: Generating absolute path