Searches the specified class loader for Isabelle source files.
Searches the specified class loader for Isabelle source files.
Isabelle sources files can be automatically managed by libisabelle
. When
using an SBT-based build, the
sbt-libisabelle
plugin
automatically configures the build to copy the Isabelle sources stored in
src/main/isabelle
into an appropriate location such that they become
part of the runtime classpath.
This function expects any number of index files in the location
.libisabelle/.files
, containing a list of relative path names where
Isabelle source files may be found. For example, an entry A/tactic.ML
will lead to a lookup for a resource at .libisabelle/A/tactic.ML
. All
index files will be processed. The referenced files will be copied to
the specified location. Path names are expected to be encoded in UTF-8,
which is the standard encoding Isabelle uses.
The specified path will then be turned into an Isabelle "component" (refer
to the Isabelle system manual for information about components) by
creating an etc/settings
file, which we will call resources
component. The root directory of the resources component is available
in the environment variable LIBISABELLE_RESOURCES_HOME
.
Resources are checked for contained components and session root
directories. This is done by looking for ROOT
, ROOTS
, and
etc/settings
in direct subdirectories that have been created below the
specified path. Components are added as subcomponents to the resources
component ($LIBISABELLE_RESOURCES_HOME/etc/components
) and session root
directories to $LIBISABELLE_RESOURCES_HOME/ROOTS
. Session roots that are
also components are only added as components, because components are
automatically discovered as session roots.
Note that this will only work correctly if the specified path ultimately gets registered as an Isabelle component. Otherwise, subcomponents that are also session roots do not get discovered properly.
Shorthand for dumpIsabelleResources
using a temporary path and the current class loader.
Utilities to extract resources from the classpath.