4.36 File System Interaction
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • File System Interaction
          • access_file/2
          • exists_file/1
          • file_directory_name/2
          • file_base_name/2
          • same_file/2
          • exists_directory/1
          • delete_file/1
          • rename_file/2
          • size_file/2
          • time_file/2
          • absolute_file_name/2
          • absolute_file_name/3
          • is_absolute_file_name/1
          • file_name_extension/3
          • directory_files/2
          • expand_file_name/2
          • prolog_to_os_filename/2
          • read_link/3
          • tmp_file/2
          • tmp_file_stream/3
          • make_directory/1
          • delete_directory/1
          • working_directory/2
          • chdir/1
    • Packages
Availability:built-in
Sourceworking_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.