Availability:built-in
working_directory(-Old,
+New)Unify Old with an absolute path to the current working
directory and change working directory to New. Use the
pattern
working_directory(CWD, CWD)
to get the current directory.
See also absolute_file_name/2
and chdir/1.bugSome
of the file I/O predicates use local filenames. Changing directory while
file-bound streams are open causes wrong results on telling/1, seeing/1
and current_stream/3.
Note that the working directory is shared between all threads.
Applications are strongly encouraged not to change the working directory
or change the working directory once during the initialization.