Reader of the stored and deflated members of a zip archive in memory.
More...
#include <ziparchive.h>
|
| std::vector< std::string > | names () const |
| | List the member names in central directory order.
|
| std::expected< std::vector< std::uint8_t >, Error > | extract (const std::string &name) const |
| | Extract one member.
|
| std::expected< Seconds, Error > | modified (const std::string &name) const |
| | Read the modification time of one member.
|
|
| static std::expected< ZipArchive, Error > | open (std::vector< std::uint8_t > data) |
| | Read the central directory of an archive.
|
Reader of the stored and deflated members of a zip archive in memory.
◆ open()
| std::expected< ZipArchive, Error > Tools::BuildImage::ZipArchive::open |
( |
std::vector< std::uint8_t > | data | ) |
|
|
static |
Read the central directory of an archive.
- Parameters
-
| data | Archive bytes. The archive takes them over. |
- Returns
- The archive, or an error when the bytes are not a zip archive.
◆ names()
| std::vector< std::string > Tools::BuildImage::ZipArchive::names |
( |
| ) |
const |
|
nodiscard |
List the member names in central directory order.
- Returns
- Member names, with their directory parts.
◆ extract()
| std::expected< std::vector< std::uint8_t >, Error > Tools::BuildImage::ZipArchive::extract |
( |
const std::string & | name | ) |
const |
|
nodiscard |
Extract one member.
- Parameters
-
| name | Member name, as names() lists it. |
- Returns
- Member contents, or an error when the member is missing or damaged.
◆ modified()
| std::expected< Seconds, Error > Tools::BuildImage::ZipArchive::modified |
( |
const std::string & | name | ) |
const |
|
nodiscard |
Read the modification time of one member.
- Parameters
-
| name | Member name, as names() lists it. |
- Returns
- The time from the central directory, read as UTC, or an error when the member is missing.
The documentation for this class was generated from the following file: