10 #ifndef CORAL_UTIL_ZIP_HPP    11 #define CORAL_UTIL_ZIP_HPP    18 #include "boost/filesystem/path.hpp"    19 #include "boost/optional.hpp"    21 #include "coral/config.h"    89     Archive(
const boost::filesystem::path& path);
   113     void Open(
const boost::filesystem::path& path);
   123     bool IsOpen() 
const CORAL_NOEXCEPT;
   197         const boost::filesystem::path& targetDir) 
const;
   223         const boost::filesystem::path& targetDir) 
const;
   238     Exception(::zip* archive) CORAL_NOEXCEPT;
   241     Exception(zip_file* file) CORAL_NOEXCEPT;
   246 #endif // header guard A class for reading ZIP archives. 
Definition: zip.hpp:72
 
const EntryIndex INVALID_ENTRY_INDEX
An index value that represents an invalid/unknown zip entry. 
Definition: zip.hpp:50
 
bool IsOpen() const CORAL_NOEXCEPT
Returns whether this object refers to an open ZIP archive. 
 
std::string EntryName(EntryIndex index) const 
Returns the name of an archive entry. 
 
Exception class for errors that occur while dealing with ZIP files. 
Definition: zip.hpp:231
 
Archive() CORAL_NOEXCEPT
Default constructor; does not associate the object with an archive file. 
 
boost::filesystem::path ExtractFileTo(EntryIndex index, const boost::filesystem::path &targetDir) const 
Extracts a single file from the archive, placing it in a specific target directory. 
 
void Open(const boost::filesystem::path &path)
Opens a ZIP archive. 
 
~Archive() CORAL_NOEXCEPT
Destructor; calls Discard(). 
 
void ExtractAll(const boost::filesystem::path &targetDir) const 
Extracts the entire contents of the archive. 
 
Definition: variable_io.hpp:28
 
void Discard() CORAL_NOEXCEPT
Closes the archive. 
 
std::uint64_t EntryIndex
A type for numeric zip entry indices. 
Definition: zip.hpp:43
 
bool IsDirEntry(EntryIndex index) const 
Returns whether an archive entry is a directory. 
 
EntryIndex FindEntry(const std::string &name) const 
Finds an entry by name. 
 
std::uint64_t EntryCount() const 
Returns the number of entries in the archive.