How to call an interactive Dialog to choose a directory with xpce

Hello everyone,

I am very new to prolog and xpce and trying to build my first GUI with it.
Since I want the user to be able to choose a directory to store files in, I was wondering if there is already an existing dialog to do that.

So far I found out how to choose a file and get its path using the following code:

call(get(@display,
           win_file_name,  
           open,  
           Filter,
           Title_atom,
           owner:=Owner,   
           File)),

Now I want to be able to choose a directory instead of a file and get its path.
I hope someone can help me and I’m excited to become a part of this community.
Happy Easter everyone :slight_smile:

Niclas

PS. I’m using: SWI-Prolog version 5.6.48

You should consider upgrading to the lastest version which can be seen here are Repology


If you are starting a project from scratch or at the very early stages then consider instead using a web interface. A good example is SWISH.

The SWISH code is availabe on GitHub.