prolog:open_source_hook(+Path,
-Stream, +Options)This hooks is called by the compiler to overrule the default open/3
call
open(Path, read, Stream). Options provide the
options as provided to load_files/2.
If the hook succeeds compilation continues by loading from the returned
(input) stream. This hook is particularly suited to support running the
code to a preprocessor. See also
prolog_load_file/2.
- Extended in 8.1.15 (👉99a2930) prolog:open_source_hook/3 to allow hooking the final open for the compiler.