• 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

15.2 Built-in predicates for attaching packs
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Packs: community add-ons
        • Built-in predicates for attaching packs
          • attach_packs/0
          • attach_packs/1
          • attach_packs/2
          • pack_attach/2
    • Packages
Availability:built-in
Sourceattach_packs(+Directory)
attach_packs(+Directory, +Options)
Attach all packs that are subdirectories of Directory. Directory is translated into a physical directory using absolute_file_name/3. This implies it can be a term Alias(SubDir) and the search is relative to the current source file if Directory is not an absolute path and these predicates are used as a directive. Defined options are:
search(+Where)
Determines the order in which pack library directories are searched. Default is to add new packages at the end (last). Using first, new packages are added at the start.
duplicate(+Action)
Determines what happens if a pack with the same name is already attached. Default is warning, which prints a warning and ignores the new pack. Other options are keep, which is like warning but operates silently and replace, which detaches the old pack and attaches the new.
replace(+Boolean)
If true, unregister all packs before registering the new packs.

The predicate attach_packs/2 can be used to attach packages that are bundled with an application. With the option replace(true), attach_packs/2 ensures that the application only relies on bundled packs.

ClioPatria (version V3.1.1-51-ga0b30a5)