6.4.7.2 File System

SICStus Prolog caches the name of the current working directory. To take advantage of the cache and to keep it consistent, foreign code should call the following interface functions instead of calling chdir() and getcwd() directly:

SP_set_current_dir()
Obtains the absolute name of the current working directory.
SP_get_current_dir()
Sets the current working directory.

Send feedback on this subject.