ReadArchiveInterface Class Reference IO

#include <ioarchivehandler.h>

Inheritance diagram for ReadArchiveInterface:

详细描述

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")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( ReadArchiveInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.readarchive"   
)
private

◆  Open()

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.
返回
OK on success.

◆  Close()

MAXON_METHOD Result <void> Close ( )

Closes the archive.

返回
OK on success.

◆  ExtractSingleFile()

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.
返回
Returns the name of the extracted file on success. If the file was not found in the archive an empty Url will be returned.

◆  Extract()

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.
返回
OK on success.