Zip file reader.
More...
#include <ziparchive.h>
Zip file reader.
- Note
- This is just a wrapper around its Rust implementation.
◆ ZipArchive() [1/4]
◆ ZipArchive() [2/4]
◆ ZipArchive() [3/4]
Open in-memory Zip from QByteArray
- Parameters
-
- Exceptions
-
◆ ZipArchive() [4/4]
Open Zip file.
- Parameters
-
- Exceptions
-
◆ operator=()
◆ getEntriesCount()
std::size_t getEntriesCount |
( |
| ) |
const |
|
noexcept |
Get number of ZIp entries (files & directories)
- Returns
- Number of entries
◆ getFileName()
QString getFileName |
( |
std::size_t |
index | ) |
|
Get the file name of an entry.
- Parameters
-
- Returns
- Entry file name (directory if it ends with slash or backslash)
- Exceptions
-
On | invalid index or if the entry file name is somehow invalid or dangerous (zeros in its name, path outside Zip, ...). |
◆ readFile()
QByteArray readFile |
( |
std::size_t |
index | ) |
|
Read the content of a file.
- Parameters
-
- Returns
- File content
- Exceptions
-
On | invalid index or I/O errors. |
◆ extractTo()
Extract whole Zip to a directory (overwriting)
- Parameters
-
- Exceptions
-
On | invalid/unsafe Zip content or I/O errors. In that case, the extraction might have been only partially (not atomically). |
◆ mHandle
The documentation for this class was generated from the following files: