|
bit7z 4.1.0
A C++ library for interfacing with the 7-zip shared libs.
|
The BitNestedArchiveReader class allows reading and extracting nested archives (e.g., the tarball inside a .tar.gz archive). More...
#include <bit7z/bitnestedarchivereader.hpp>
Public Member Functions | |
| BitNestedArchiveReader (const Bit7zLibrary &lib, const BitInputArchive &parentArchive, const BitInFormat &format, const tstring &password={}) | |
| Constructs a BitNestedArchiveReader object of the first item in the parent archive. | |
| BitNestedArchiveReader (const Bit7zLibrary &lib, const BitInputArchive &parentArchive, std::uint32_t index, const BitInFormat &format, const tstring &password={}) | |
| Constructs a BitNestedArchiveReader object. | |
| auto | archiveProperty (BitProperty property) const -> BitPropVariant |
| Gets the specified archive property. | |
| void | clearPassword () noexcept |
| Clear the current password used by the handler. | |
| auto | detectedFormat () const noexcept -> const BitInFormat & |
| auto | extractionFormat () const noexcept -> const BitInFormat & |
| void | extractTo (const tstring &outDir) const |
| Extracts the archive to the chosen directory. | |
| void | extractTo (std::map< tstring, buffer_t > &outMap) const |
| Extracts the content of the archive to a map of memory buffers, where the keys are the paths of the files (inside the archive), and the values are their decompressed contents. | |
| auto | fileCallback () const -> const FileCallback & |
| auto | format () const noexcept -> const BitInFormat &override |
| auto | isPasswordDefined () const noexcept -> bool |
| auto | itemProperty (std::uint32_t index, BitProperty property) const -> BitPropVariant |
| Gets the specified property of an item in the archive. | |
| auto | items () const -> std::vector< BitArchiveItemInfo > |
| auto | itemsCount () const -> std::uint32_t |
| auto | library () const noexcept -> const Bit7zLibrary & |
| auto | maxMemoryUsage () const noexcept -> std::uint64_t |
| auto | openCount () const -> std::size_t |
| auto | overwriteMode () const noexcept -> OverwriteMode |
| auto | password () const -> const tstring & |
| auto | passwordCallback () const -> const PasswordCallback & |
| auto | progressCallback () const -> const ProgressCallback & |
| auto | ratioCallback () const -> const RatioCallback & |
| auto | retainDirectories () const noexcept -> bool |
| void | setFileCallback (const FileCallback &callback) |
| Sets the function to be called when the current file being processed changes. | |
| void | setMaxMemoryUsage (std::uint64_t value) noexcept |
| Sets the max memory usage limit to be used while extracting the parent archive. | |
| void | setOverwriteMode (OverwriteMode mode) |
| Sets how the handler should behave when it tries to output to an existing file or buffer. | |
| virtual void | setPassword (const tstring &password) |
| Sets up a password to be used by the archive handler. | |
| void | setPasswordCallback (const PasswordCallback &callback) |
| Sets the function to be called when a password is needed to complete the ongoing operation. | |
| void | setProgressCallback (const ProgressCallback &callback) |
| Sets the function to be called when the processed size of the ongoing operation is updated. | |
| void | setRatioCallback (const RatioCallback &callback) |
| Sets the function to be called when the input processed size and current output size of the ongoing operation are known. | |
| void | setRetainDirectories (bool retain) noexcept |
| Sets whether the operations' output will preserve the input's directory structure or not. | |
| void | setTotalCallback (const TotalCallback &callback) |
| Sets the function to be called when the total size of an operation is available. | |
| void | test () const |
| Tests the archive without extracting its content. | |
| auto | totalCallback () const -> const TotalCallback & |
The BitNestedArchiveReader class allows reading and extracting nested archives (e.g., the tarball inside a .tar.gz archive).
| BitNestedArchiveReader | ( | const Bit7zLibrary & | lib, |
| const BitInputArchive & | parentArchive, | ||
| std::uint32_t | index, | ||
| const BitInFormat & | format, | ||
| const tstring & | password = {} ) |
Constructs a BitNestedArchiveReader object.
| lib | the 7z library used. |
| parentArchive | the parent archive containing the nested archive. |
| index | the index of the nested archive within the parent archive. |
| format | the format of the nested archive. |
| password | (optional) the password needed for opening the nested archive. |
| BitException | if the format is BitFormat::Auto (automatic format detection of nested archives is not supported). |
| BitNestedArchiveReader | ( | const Bit7zLibrary & | lib, |
| const BitInputArchive & | parentArchive, | ||
| const BitInFormat & | format, | ||
| const tstring & | password = {} ) |
Constructs a BitNestedArchiveReader object of the first item in the parent archive.
| lib | the 7z library used. |
| parentArchive | the parent archive containing the nested archive. |
| format | the format of the nested archive. |
| password | (optional) the password needed for opening the nested archive. |
| BitException | if the format is BitFormat::Auto (automatic format detection of nested archives is not supported). |
| auto archiveProperty | ( | BitProperty | property | ) | const -> BitPropVariant |
Gets the specified archive property.
| property | the property to be retrieved. |
|
noexceptinherited |
Clear the current password used by the handler.
Calling clearPassword() will disable the encryption/decryption of archives.
|
noexcept |
|
noexceptinherited |
| void extractTo | ( | const tstring & | outDir | ) | const |
Extracts the archive to the chosen directory.
| outDir | the output directory where the extracted files will be put. |
Extracts the content of the archive to a map of memory buffers, where the keys are the paths of the files (inside the archive), and the values are their decompressed contents.
| outMap | the output map. |
|
inherited |
|
overridevirtualnoexceptinherited |
Implements BitAbstractArchiveHandler.
|
noexceptinherited |
| auto itemProperty | ( | std::uint32_t | index, |
| BitProperty | property ) const -> BitPropVariant |
Gets the specified property of an item in the archive.
| index | the index (in the archive) of the item. |
| property | the property to be retrieved. |
| auto items | ( | ) | const -> std::vector< BitArchiveItemInfo > |
| auto itemsCount | ( | ) | const -> std::uint32_t |
|
noexceptinherited |
|
noexcept |
| auto openCount | ( | ) | const -> std::size_t |
|
noexceptinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
noexceptinherited |
|
inherited |
Sets the function to be called when the current file being processed changes.
| callback | the file callback to be used. |
|
noexcept |
Sets the max memory usage limit to be used while extracting the parent archive.
| value | the max memory limit to be used (in bytes). |
|
inherited |
Sets how the handler should behave when it tries to output to an existing file or buffer.
| mode | the OverwriteMode to be used by the handler. |
|
virtualinherited |
Sets up a password to be used by the archive handler.
The password will be used to encrypt/decrypt archives by using the default cryptographic method of the archive format.
| password | the password to be used. |
Reimplemented in BitAbstractArchiveCreator.
|
inherited |
Sets the function to be called when a password is needed to complete the ongoing operation.
| callback | the password callback to be used. |
|
inherited |
Sets the function to be called when the processed size of the ongoing operation is updated.
| callback | the progress callback to be used. |
|
inherited |
Sets the function to be called when the input processed size and current output size of the ongoing operation are known.
| callback | the ratio callback to be used. |
|
noexceptinherited |
Sets whether the operations' output will preserve the input's directory structure or not.
| retain | the setting for preserving or not the input directory structure |
|
inherited |
Sets the function to be called when the total size of an operation is available.
| callback | the total callback to be used. |
| void test | ( | ) | const |
Tests the archive without extracting its content.
| BitException | if the archive is not valid. |
|
inherited |