Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::ArchiveCommands Class Referenceabstract

#include <ArchiveAPI.h>

Inherits AZ::EBusTraits.

Public Types

typedef AZStd::recursive_mutex MutexType
 

Public Member Functions

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 Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 
static const bool LocklessDispatch = true
 

Detailed Description

ArchiveCommands This bus handles messages relating to archive commands archive commands are ASYNCHRONOUS archive formats officially supported are .zip

Member Function Documentation

◆ 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
archivePathThe path of the archive to add to
workingDirectoryA directory that will be the starting path of the list of files to add
listFilePathFull 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
archivePathThe path of the archive to add to
workingDirectoryA directory that will be the starting path of the file to be added
fileToAddA 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
archivePathThe 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
archivePathThe path of the archive to extract
destinationPathThe 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
archivePathThe path of the archive to extract from
fileInArchiveA path to a file, relative to root of archive
destinationPathThe 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
archivePathThe path of the archive to list
outFileEntriesAn 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: