#include <ArchiveAPI.h>
Inherits AZ::EBusTraits.
|
typedef AZStd::recursive_mutex | MutexType |
|
|
virtual std::future< bool > | CreateArchive (const AZStd::string &archivePath, const AZStd::string &dirToArchive)=0 |
|
virtual std::future< bool > | ExtractArchive (const AZStd::string &archivePath, const AZStd::string &destinationPath)=0 |
|
virtual std::future< bool > | ExtractFile (const AZStd::string &archivePath, const AZStd::string &fileInArchive, const AZStd::string &destinationPath)=0 |
|
virtual bool | ListFilesInArchive (const AZStd::string &archivePath, AZStd::vector< AZStd::string > &outFileEntries)=0 |
|
virtual std::future< bool > | AddFileToArchive (const AZStd::string &archivePath, const AZStd::string &workingDirectory, const AZStd::string &fileToAdd)=0 |
|
virtual std::future< bool > | AddFilesToArchive (const AZStd::string &archivePath, const AZStd::string &workingDirectory, const AZStd::string &listFilePath)=0 |
|
|
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
|
static const AZ::EBusAddressPolicy | AddressPolicy = AZ::EBusAddressPolicy::Single |
|
static const bool | LocklessDispatch = true |
|
ArchiveCommands This bus handles messages relating to archive commands archive commands are ASYNCHRONOUS archive formats officially supported are .zip
◆ AddFilesToArchive()
virtual std::future< bool > AzToolsFramework::ArchiveCommands::AddFilesToArchive |
( |
const AZStd::string & |
archivePath, |
|
|
const AZStd::string & |
workingDirectory, |
|
|
const AZStd::string & |
listFilePath |
|
) |
| |
|
pure virtual |
Add files to an archive provided from a file listing The archive might not exist yet File paths in the file list should be relative to root of the archive
- Parameters
-
archivePath | The path of the archive to add to |
workingDirectory | A directory that will be the starting path of the list of files to add |
listFilePath | Full path to a text file that contains the list of files to add |
- Returns
- Future (bool) which can obtain the success value of the operation
◆ AddFileToArchive()
virtual std::future< bool > AzToolsFramework::ArchiveCommands::AddFileToArchive |
( |
const AZStd::string & |
archivePath, |
|
|
const AZStd::string & |
workingDirectory, |
|
|
const AZStd::string & |
fileToAdd |
|
) |
| |
|
pure virtual |
Add a file to an archive The archive might not exist yet The file path relative to the working directory will be replicated in the archive
- Parameters
-
archivePath | The path of the archive to add to |
workingDirectory | A directory that will be the starting path of the file to be added |
fileToAdd | A path to the file relative to the working directory |
- Returns
- Future (bool) which can obtain the success value of the operation
◆ CreateArchive()
virtual std::future< bool > AzToolsFramework::ArchiveCommands::CreateArchive |
( |
const AZStd::string & |
archivePath, |
|
|
const AZStd::string & |
dirToArchive |
|
) |
| |
|
pure virtual |
Create an archive of the target directory (all files and subdirectories)
- Parameters
-
archivePath | The path of the archive to create @dirToArchive The directory to be added to the archive |
- Returns
- Future (bool) which can obtain the success value of the operation
◆ ExtractArchive()
virtual std::future< bool > AzToolsFramework::ArchiveCommands::ExtractArchive |
( |
const AZStd::string & |
archivePath, |
|
|
const AZStd::string & |
destinationPath |
|
) |
| |
|
pure virtual |
Extract an archive to the target directory
- Parameters
-
archivePath | The path of the archive to extract |
destinationPath | The directory where files will be extracted to |
- Returns
- Future (bool) which can obtain the success value of the operation
◆ ExtractFile()
virtual std::future< bool > AzToolsFramework::ArchiveCommands::ExtractFile |
( |
const AZStd::string & |
archivePath, |
|
|
const AZStd::string & |
fileInArchive, |
|
|
const AZStd::string & |
destinationPath |
|
) |
| |
|
pure virtual |
Extract a single file from the archive to the destination Destination path should not be empty
- Parameters
-
archivePath | The path of the archive to extract from |
fileInArchive | A path to a file, relative to root of archive |
destinationPath | The directory where file will be extracted to |
- Returns
- Future (bool) which can obtain the success value of the operation
◆ ListFilesInArchive()
virtual bool AzToolsFramework::ArchiveCommands::ListFilesInArchive |
( |
const AZStd::string & |
archivePath, |
|
|
AZStd::vector< AZStd::string > & |
outFileEntries |
|
) |
| |
|
pure virtual |
Retrieve the list of files contained in an archive (all files and subdirectories)
- Parameters
-
archivePath | The path of the archive to list |
outFileEntries | An out parameter that will contain the file paths found |
- Returns
- True if successful, false otherwise
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/Archive/ArchiveAPI.h