• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

/usr/lib/swipl/library/ext/archive/archive.pl
All Application Manual Name SummaryHelp

  • archive
    • archive.pl -- Access several archive formats
      • archive_open/3
      • archive_open/4
      • archive_close/1
      • archive_property/2
      • archive_next_header/2
      • archive_open_entry/2
      • archive_set_header_property/2
      • archive_header_property/2
      • archive_extract/3
      • archive_entries/2
      • archive_data_stream/3
      • archive_create/3
      • archive_foldl/4
 archive_next_header(+Handle, -Name) is semidet
Forward to the next entry of the archive for which Name unifies with the pathname of the entry. Fails silently if the end of the archive is reached before success. Name is typically specified if a single entry must be accessed and unbound otherwise. The following example opens a Prolog stream to a given archive entry. Note that Stream must be closed using close/1 and the archive must be closed using archive_close/1 after the data has been used. See also setup_call_cleanup/3.
open_archive_entry(ArchiveFile, EntryName, Stream) :-
    open(ArchiveFile, read, In, [type(binary)]),
    archive_open(In, Archive, [close_parent(true)]),
    archive_next_header(Archive, EntryName),
    archive_open_entry(Archive, Stream).
Errors
- permission_error(next_header, archive, Handle) if a previously opened entry is not closed.
ClioPatria (version V3.1.1-51-ga0b30a5)