Availability:built-in
source_file_property(?File,
?Property)True when Property is a property of the loaded file File.
If File is non-var, it can be a file specification that is
valid for load_files/2.
Defined properties are:
- derived_from(Original, OriginalModified)
- File was generated from the file Original, which
was last modified at time OriginalModified at the time it was
loaded. This property is available if File was loaded using
the
derived_from(Original)
option to load_files/2.
- includes(IncludedFile, IncludedFileModified)
- File used include/1
to include IncludedFile. The last modified time of IncludedFile
was IncludedFileModified at the time it was included.
- included_in(MasterFile, Line)
- File was included into MasterFile from line Line.
This is the inverse of the
includes
property.
- load_context(Module, Location, Options)
- Module is the module into which the file was loaded. If File
is a module, this is the module into which the exports are imported.
Otherwise it is the module into which the clauses of the non-module file
are loaded. Location describes the file location from which
the file was loaded. It is either a term <file>:<line>
or the atom
user
if the file was loaded from the terminal or another
unknown source. Options are the options passed to load_files/2.
Note that all predicates to load files are mapped to load_files/2,
using the option argument to specify the exact behaviour.
- load_count(-Count)
- Count is the number of times the file have been loaded, i.e.,
1 (one) if the file has been loaded once.
- modified(Stamp)
- File modification time when File was loaded. This is used by
make/0
to find files whose modification time is different from when it was
loaded.
- source(Source)
- One of
file
if the source was loaded from a file,
resource
if the source was loaded from a resource or
state
if the file was included in the saved state.
- module(Module)
- File is a module file that declares the module Module.
- number_of_clauses(Count)
- Count is the number of clauses associated with File.
Note that clauses loaded from included files are counted as part of the
main file.
- reloading
- Present if the file is currently being reloaded.