• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • 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

12.3.1 Resource manipulation predicates
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Generating Runtime Applications
        • Using program resources
          • Resource manipulation predicates
            • resource/3
            • open_resource/3
    • Packages
Availability:built-in
Sourceopen_resource(+Name, ?Class, -Stream)
Opens the resource specified by Name and Class. If the latter is a variable, it will be unified to the class of the first resource found that has the specified Name. If successful, Stream becomes a handle to a binary input stream, providing access to the content of the resource.

The predicate open_resource/3 first checks resource/3. When successful it will open the returned resource source file. Otherwise it will look in the program's resource database. When creating a saved state, the system normally saves the resource contents into the resource archive, but does not save the resource clauses.

This way, the development environment uses the files (and modifications) to the resource/3 declarations and/or files containing resource info, thus immediately affecting the running environment, while the runtime system quickly accesses the system resources.

ClioPatria (version V3.1.1-21-gb8003bb)