4.3 Loading Prolog source files
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Loading Prolog source files
          • load_files/1
          • load_files/2
          • consult/1
          • ensure_loaded/1
          • include/1
          • require/1
          • encoding/1
          • make/0
          • library_directory/1
          • file_search_path/2
          • expand_file_search_path/2
          • prolog_file_type/2
          • source_file/1
          • source_file/2
          • source_file_property/2
          • exists_source/1
          • exists_source/2
          • unload_file/1
          • prolog_load_context/2
          • source_location/2
          • at_halt/1
          • cancel_halt/1
          • initialization/1
          • initialization/2
          • initialize/0
          • compiling/0
          • Conditional compilation and program transformation
          • Reloading files, active code and threads
          • Quick load files
    • Packages
Availability:built-in
Source[semidet]exists_source(+Source)
True if Source (a term valid for load_files/2) exists. Fails without error if this is not the case. The predicate is intended to be used with conditional compilation (see section 4.3.1.2 For example:
:- if(exists_source(library(error))).
:- use_module_library(error).
:- endif.

The implementation uses absolute_file_name/3 using file_type(prolog).