#include <ZipArchive.h>
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.
- See Also
- Compressing Data
CZipAddNewFileInfo::CZipAddNewFileInfo |
( |
LPCTSTR |
lpszFilePath, |
|
|
bool |
bFullPath = true |
|
) |
| |
|
inline |
CZipAddNewFileInfo::CZipAddNewFileInfo |
( |
LPCTSTR |
lpszFilePath, |
|
|
LPCTSTR |
lpszFileNameInZip |
|
) |
| |
|
inline |
CZipAddNewFileInfo::CZipAddNewFileInfo |
( |
CZipAbstractFile * |
pFile, |
|
|
LPCTSTR |
lpszFileNameInZip |
|
) |
| |
|
inline |
void CZipAddNewFileInfo::Defaults |
( |
| ) |
|
bool CZipAddNewFileInfo::m_bFullPath |
int CZipAddNewFileInfo::m_iComprLevel |
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
).
unsigned long CZipAddNewFileInfo::m_nBufSize |
The size of the buffer used while file operations.
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.
- Note
- You have to leave m_szFilePath empty if you set m_pFile to not
NULL
.
- The time of a file in zip will be set to the current time, and the attributes to the default file attributes (depending on the system).
- You cannot add directories this way.
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.
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
.
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:
- >= 0 : the index of the file to be replaced.
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.
- Note
- If you use an invalid index, the action will fail.
- If you specify the last file in the archive to be replaced, it'll be removed and the usual action will be taken.
- See Also
- CZipArchive::SetAdvanced
-
CZipArchive::WillBeDuplicated
The documentation for this struct was generated from the following file: