All loading of source-files is achieved by load_files/2. The hook prolog_load_file/2 can be used to load Prolog code from non-files or even load entirely different information, such as foreign files.
stream(Input)
option.
The library(http_load)
provides an example, loading
Prolog sources directly from an HTTP server.