#include <ioarchivehandler.h>
Interface class to read archives.
公共成员函数 |
|
| MAXON_METHOD Result < void > | Open (const Url &inputFile, const String &password= String ()) |
| MAXON_METHOD Result < void > | 关闭 () |
| 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) |
私有成员函数 |
|
| MAXON_INTERFACE ( ReadArchiveInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.readarchive") | |
|
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. |