#include <ioarchivehandler.h>
Interface class to read archives.
Public Member Functions | |
MAXON_METHOD Result< void > | Open (const Url &inputFile, const String &password=String()) |
MAXON_METHOD Result< void > | Close () |
MAXON_METHOD Result< Url > | ExtractSingleFile (const String &archiveFile, const Url &outputDirectory, ThreadRef thread, IOARCHIVEEXTRACTFLAGS flags, const ExtractCallback &extractCallback) |
MAXON_METHOD Result< void > | Extract (const Url &outputDirectory, ThreadRef thread, IOARCHIVEEXTRACTFLAGS flags, const ExtractCallback &extractCallback) |
Private Member Functions | |
MAXON_INTERFACE (ReadArchiveInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.readarchive", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
|
private |
MAXON_METHOD Result<void> Open | ( | const Url & | inputFile, |
const String & | password = String() |
||
) |
Opens an archive for reading.
[in] | inputFile | The path of the archive. |
[in] | password | An optional password. |
MAXON_METHOD Result<void> Close | ( | ) |
Closes the archive.
MAXON_METHOD Result<Url> ExtractSingleFile | ( | const String & | archiveFile, |
const Url & | outputDirectory, | ||
ThreadRef | thread, | ||
IOARCHIVEEXTRACTFLAGS | flags, | ||
const ExtractCallback & | extractCallback | ||
) |
Extracts a single file from an archive. Using extractCallback you can modify attributes.
[in] | archiveFile | The file to extract from the archive. Note that this must match exactly the name within the archive. |
[in] | outputDirectory | The path the archive shall be extracted to. If the directory does not exist if will be created. |
[in] | thread | An optional thread to check for IsCancelled. Can be nullptr. |
[in] | flags | Control the behavior of the function see IOARCHIVEEXTRACTFLAGS. |
[in] | extractCallback | A callback that allows you to control the extraction process. |
MAXON_METHOD Result<void> Extract | ( | const Url & | outputDirectory, |
ThreadRef | thread, | ||
IOARCHIVEEXTRACTFLAGS | flags, | ||
const ExtractCallback & | extractCallback | ||
) |
Extracts all files from an archive. Using extractCallback you can filter which files shall be extracted and modify attributes.
[in] | outputDirectory | The path the archive shall be extracted to. If the directory does not exist if will be created. |
[in] | thread | An optional thread to check for IsCancelled. Can be nullptr. |
[in] | flags | Control the behavior of the function see IOARCHIVEEXTRACTFLAGS. |
[in] | extractCallback | A callback that allows you to control the extraction process. |