• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.36 File System Interaction
All Application Manual Name SummaryHelp

  • 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
          • tmp_directory/2
          • make_directory/1
          • delete_directory/1
          • working_directory/2
          • chdir/1
    • Packages
Availability:built-in
tmp_directory(+Base, -Directory)
Create a new directory Directory for temporary files. Base is used as for tmp_file/2 and the directory is created in the directory defined by the Prolog flag tmp_dir. The directory is only accessible to the current user. Unlike tmp_file/2, this predicate creates the directory and, if the generated name already exists, tries a new name. It is thus safe if multiple processes create temporary directories concurrently.

If the Prolog process terminates gracefully, Directory is removed if it is empty after removing the temporary files, including those created by tmp_file_stream/3 inside Directory. Removing the content is the responsibility of the application, for example using delete_directory_and_contents/1 from library(filesex).

ClioPatria (version V3.1.1-59-g7b9a7a3)