SWI Prolog change working directory/get current working directory?

mezamorphic picture mezamorphic · Jul 24, 2012 · Viewed 25.6k times · Source

in SWI Prolog terminal how do I view the current working directory and change the current working directory?

I found:

working_directory(CWD, CWD)

but I dont think its what I need

Answer

gusbro picture gusbro · Oct 12, 2012

To get the current working directory use working_directory(CWD, CWD).

To change the current working directory use working_directory(_, NewCWD).

Check here to see the manual entry for this predicate.