CZipAddNewFileInfo Struct Reference

#include <ZipArchive.h>

List of all members.

Public Member Functions

 CZipAddNewFileInfo (CZipAbstractFile *pFile, LPCTSTR lpszFileNameInZip)
 CZipAddNewFileInfo (LPCTSTR lpszFilePath, LPCTSTR lpszFileNameInZip)
 CZipAddNewFileInfo (LPCTSTR lpszFilePath, bool bFullPath=true)
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


Detailed Description

The structure used as a parameter in CZipArchive::AddNewFile(CZipAddNewFileInfo& ). Use one of the provided constructors and then adjust the member variables as needed.

See also:
Compressing Data

Definition at line 63 of file ZipArchive.h.


Constructor & Destructor Documentation

CZipAddNewFileInfo::CZipAddNewFileInfo ( LPCTSTR  lpszFilePath,
bool  bFullPath = true 
) [inline]

Initializes a new instance of the CZipAddNewFileInfo class.

Parameters:
lpszFilePath Sets m_szFilePath.
bFullPath Sets m_bFullPath.

Definition at line 74 of file ZipArchive.h.

CZipAddNewFileInfo::CZipAddNewFileInfo ( LPCTSTR  lpszFilePath,
LPCTSTR  lpszFileNameInZip 
) [inline]

Initializes a new instance of the CZipAddNewFileInfo class.

Parameters:
lpszFilePath Sets m_szFilePath.
lpszFileNameInZip Sets m_szFileNameInZip.

Definition at line 90 of file ZipArchive.h.

CZipAddNewFileInfo::CZipAddNewFileInfo ( CZipAbstractFile *  pFile,
LPCTSTR  lpszFileNameInZip 
) [inline]

Initializes a new instance of the CZipAddNewFileInfo class.

Parameters:
pFile Sets m_pFile.
lpszFileNameInZip Sets m_szFileNameInZip.

Definition at line 106 of file ZipArchive.h.


Member Function Documentation

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.


Member Data Documentation

It has only the meaning when CZipAddNewFileInfo::m_szFileNameInZip is not specified and CZipAddNewFileInfo::m_szFilePath is not empty.

Definition at line 151 of file ZipArchive.h.

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 157 of file ZipArchive.h.

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 163 of file ZipArchive.h.

The size of the buffer used while file operations.

Definition at line 187 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.

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.

Definition at line 123 of file ZipArchive.h.

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 137 of file ZipArchive.h.

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_bRemoveDriveLetter is set to false.

Definition at line 130 of file ZipArchive.h.

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

Definition at line 182 of file ZipArchive.h.


The documentation for this struct was generated from the following file:

The ZipArchive Library Copyright © 2000 - 2009 Artpol Software - Tadeusz Dracz. Generated at Fri Apr 24 16:46:34 2009.