source_file/1
Module
Built-in predicate.
Description
True when File is one of the Prolog source files loaded in the current interpreter.
Signature
source_file(?File) is nondet
Examples
Match a loaded source file
This scenario demonstrates checking whether a source file has been loaded.
Here are the steps of the scenario:
- Given the query:
consult('/v1/lib/lists.pl'),
source_file('/v1/lib/lists.pl').
- When the query is run
- Then the answer we get is:
height: 42
gas_used: 4301
answer:
has_more: false
variables:
results:
- substitutions: