| Did you know ... | Search Documentation: |
| zip.pl -- Access resource ZIP archives |
This library provides access to ZIP files. ZIP files are used to store SWI-Prolog resources. Ths library provides more high level access and documentation in addition to the low level access provided as built in as it is needed to bootstrap SWI-Prolog.
Access to a zip file is provided by means of a zipper object. This is a blob that is subject to atom garbage collection. Collecting a zipper closes the underlying OS access.
A zipper is a stateful object. We recognise the following states: idle, scan, read_entry, write_entry and close. The interface raise a permission_error when trying to make an illegal state transition.
Being stateful, a zipper cannot be used simultaneously from multiple threads. The zipper becomes owned by a thread when moving to scan using zipper_goto/2. It is released after zipper_open_current/3 followed by closing the stream.
zip_open(+File, +Mode, -Zipper, +Options) is detread or
write. The Options list is currently ignored.
zip_close(+Zipper) is det
zip_close(+Zipper, +Options) is dettrue (default), release te archive for access by other
threads after the entry is closed.It is allowed to call zip_close/1 immediately after this call, in which case the archive is closed when the entry is closed.
with_zipper(+Zipper, :Goal)
zipper_members(+Zipper, -Members:list(atom)) is det
zipper_file_info(+Zipper, -Name, -Attrs) is detThe following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
zip_close(+Zipper) is det
zip_close(+Zipper, +Options) is detThe following predicates are exported, but not or incorrectly documented.