#include <ZipArchive.h>
Public Member Functions | |
CZipAddNewFileInfo (LPCTSTR lpszFilePath, bool bFullPath=true) | |
CZipAddNewFileInfo (LPCTSTR lpszFilePath, LPCTSTR lpszFileNameInZip) | |
CZipAddNewFileInfo (CZipAbstractFile *pFile, LPCTSTR lpszFileNameInZip) | |
void | Defaults () |
Public Attributes | |
bool | m_bFullPath |
int | m_iComprLevel |
ZipArchiveLib::CBitFlag | m_iSmartLevel |
unsigned long | m_nBufSize |
CZipAbstractFile * | m_pFile |
CZipString | m_szFileNameInZip |
CZipString | m_szFilePath |
ZIP_INDEX_TYPE | m_uReplaceIndex |
The structure used as a parameter in the CZipArchive::AddNewFile(CZipAddNewFileInfo& ) method. Use one of the provided constructors and then adjust the member variables as needed.
Definition at line 61 of file ZipArchive.h.
|
inline |
Initializes a new instance of the CZipAddNewFileInfo class.
lpszFilePath | Sets m_szFilePath. |
bFullPath | Sets m_bFullPath. |
Definition at line 73 of file ZipArchive.h.
|
inline |
Initializes a new instance of the CZipAddNewFileInfo class.
lpszFilePath | Sets m_szFilePath. |
lpszFileNameInZip | Sets m_szFileNameInZip. |
Definition at line 90 of file ZipArchive.h.
|
inline |
Initializes a new instance of the CZipAddNewFileInfo class.
pFile | Sets m_pFile. |
lpszFileNameInZip | Sets m_szFileNameInZip. |
Definition at line 107 of file ZipArchive.h.
void CZipAddNewFileInfo::Defaults | ( | ) |
Sets the default values for m_iSmartLevel, m_uReplaceIndex, m_nBufSize and m_iComprLevel. Examine the source code for the current values.
bool CZipAddNewFileInfo::m_bFullPath |
It has only the meaning when CZipAddNewFileInfo::m_szFileNameInZip is not specified and CZipAddNewFileInfo::m_szFilePath is not empty.
true
, instructs to store the full path of the file inside the archive, even if CZipArchive::m_szRootPath is set.false
only a filename without a path is stored in the archive. In this case, if CZipArchive::m_szRootPath is set previously with CZipArchive::SetRootPath, and if the beginning of m_szFilePath equals CZipArchive::m_szRootPath, then the filename is set to the not matched part of m_szFilePath (you could say to m_szFilePath minus CZipArchive::m_szRootPath). Definition at line 152 of file ZipArchive.h.
int CZipAddNewFileInfo::m_iComprLevel |
The level of compression. You can use values from 0
to 9
and -1
(meaning the default compression) or one of the CZipCompressor::CompressionLevel values.
Definition at line 158 of file ZipArchive.h.
ZipArchiveLib::CBitFlag CZipAddNewFileInfo::m_iSmartLevel |
The smartness level of the file adding process. It can be one or more of the CZipArchive::Smartness values (you can use the logical OR
).
Definition at line 164 of file ZipArchive.h.
unsigned long CZipAddNewFileInfo::m_nBufSize |
The size of the buffer used while file operations.
Definition at line 188 of file ZipArchive.h.
CZipAbstractFile* CZipAddNewFileInfo::m_pFile |
Initialize this field to set the source data for compression to be taken from the CZipAbstractFile
object (such as CZipMemFile
) instead of from a physical file.
NULL
.Definition at line 124 of file ZipArchive.h.
CZipString CZipAddNewFileInfo::m_szFileNameInZip |
The file name that will be stored in the archive. If the file is a directory, there will be a path separator automatically appended. The CZipArchive::SetRootPath method has no effect on this parameter.
Definition at line 138 of file ZipArchive.h.
CZipString CZipAddNewFileInfo::m_szFilePath |
The full path to the file to be added. If it is empty, you need to initialize m_pFile. If m_bFullPath is true
and the path contains a drive letter, the drive letter is removed unless CZipArchive::m_bSafePaths is set to false
.
Definition at line 131 of file ZipArchive.h.
ZIP_INDEX_TYPE CZipAddNewFileInfo::m_uReplaceIndex |
The index of an existing file in the archive to be replaced by the file being added. See Modification of Archives: Replacing, Renaming, Deleting and Changing Data for more information. The meaning of its values is as follows:
ZIP_FILE_INDEX_UNSPECIFIED
: do not replace any file and add the new file at the end of the archive (default). Use this value in segmented archives.Definition at line 183 of file ZipArchive.h.