• 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

A.52 library(settings): Setting management
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(settings): Setting management
          • setting/4
          • setting/2
          • env/2
          • env/3
          • set_setting/2
          • restore_setting/1
          • set_setting_default/2
          • load_settings/1
          • load_settings/2
          • save_settings/0
          • save_settings/1
          • current_setting/1
          • setting_property/2
          • list_settings/0
          • list_settings/1
          • convert_setting_text/3
    • Packages
Availability::- use_module(library(settings)).(can be autoloaded)
Source[det]load_settings(File)
[det]load_settings(File, +Options)
Load local settings from File. Succeeds if File does not exist, setting the default save-file to File. Options are:
undefined(+Action)
Define how to handle settings that are not defined. When error, an error is printed and the setting is ignored. when load, the setting is loaded anyway, waiting for a definition.

If possibly changed settings need to be persistent, the application must call save_settings/0 as part of its shutdown. In simple cases calling at_halt(save_settings) is sufficient.

ClioPatria (version V3.1.1-51-ga0b30a5)