11.3.189 save_files/2

Synopsis

save_files(+SourceFiles, +File)

Any code loaded from SourceFiles is saved into File in PO format.

Arguments

SourceFiles
file_spec or list of file_spec, must be ground

A file specification or a list of file specifications; extensions optional.

File
file_spec, must be ground

A file specification, `.po' extension optional.

Description

Any module declarations, predicates, multifile clauses, or directives encountered in SourceFiles are saved in object format into the file denoted by File. Source file information as provided by source_file/[1,2] for the relevant predicates and modules is also saved.

File can later be loaded by load_files/[1,2], at which time any saved directives will be re-executed. If any of the SourceFiles declares a module, FileSpec too will behave as a module-file and export the predicates listed in the first module declaration encountered in SourceFiles. See ref-sls.

Exceptions

instantiation_error
SourceFiles or File is not bound.
type_error
SourceFiles or File is not a valid file specification.
permission_error
File is not writable, or a predicate is built-in, TODO.

See Also

load_files/[1,2], ref-sls, ref-sls-ssl.


Send feedback on this subject.