[ Predicate Database and Compiler | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

current_compiled_file(?File, -Time, -Module)

Succeeds if File is a file that has been compiled into the system.
File
Atom or variable.
Time
Integer or variable.
Module
Atom or variable.

Description

This predicate enumerates all files that have been compiled during this ECLiPSe session. Time is the modification time of the file at the time it was compiled, and Module is the module from where it was compiled (the latter is irrelevant if the file contains a module itself). The information can be used to determine if a file needs to be recompiled.

Modes and Determinism

Exceptions

(5) type error
File instantiated, but not to an atom.
(5) type error
Time instantiated, but not to an integer.
(5) type error
Module instantiated, but not to an atom.

Examples

make :- current_compiled_file(File, Time, Module),
        get_file_info(File, mtime) =\= Time,
        compile(File, Module),
        fail.
make.



See Also

compile / 1, compile / 2, ensure_loaded / 1, make / 0