#include <ZipStorage.h>
Public Types | |
enum | ZipSpanMode { noSpan, pkzipSpan, tdSpan, suggestedAuto, suggestedTd } |
The type of the disk spanning archive. More... | |
Public Member Functions | |
void | Open (CZipAbstractFile &af, int iMode) |
Open the archive in memory (new or existing). | |
void | Open (LPCTSTR szPathName, int iMode, int iVolumeSize) |
Open or create an archive. | |
void | FinalizeSpan () |
Close the disk-spanning archive and reopens as an existing disk-spanning archive or set mode to noSpan. | |
void | UpdateSpanMode (WORD uLastDisk) |
Called only by CZipCentralDir::Read() when opening an existing archive. | |
DWORD | AssureFree (DWORD iNeeded) |
Ensures than in a disk spanning archive, there is enough free space in the current volume. | |
void | Write (const void *pBuf, DWORD iSize, bool bAtOnce) |
Write chunk of data to the archive. | |
DWORD | GetOccupiedSpace () const |
bool | IsClosed (bool bArchive) const |
DWORD | Read (void *pBuf, DWORD iSize, bool bAtOnce) |
Read chunk of data from the archive. | |
DWORD | GetPosition () const |
Return the position in the file, taking into account the bytes in the write buffer. | |
void | Flush () |
Flush the data from the read buffer to the disk. | |
void | FlushFile () |
Forces any data remaining in the file buffer to be written to the disk. | |
void | NextDisk (int iNeeded, LPCTSTR lpszFileName=NULL) |
A method used to change disks during writing to the disk spanning archive. | |
int | GetCurrentDisk () const |
void | ChangeDisk (int iNumber) |
Change the disk during extract operations. | |
int | IsSpanMode () const |
Detect the span mode. | |
bool | IsReadOnly () |
return true if the archive cannot be modified. | |
void | SetTreatAsSingleDisk (bool bSingleDisk=true) |
If you set bSingleDisk to true , no disk change will occur while reading an existing archive. | |
CZipString | Close (bool bAfterException) |
Public Attributes | |
int | m_iWriteBufferSize |
The size of the write buffer. | |
CZipFile | m_internalfile |
The physical archive file (on a storage device). | |
CZipAbstractFile * | m_pFile |
The buffer representing the archive. | |
int | m_iSpanMode |
Takes one of the values of ZipSpanMode. | |
CZipSpanCallback * | m_pChangeDiskFunc |
A callback object which method Callback is called when there is a need for a disk change while operating on a pkzipSpan archive. | |
Static Public Attributes | |
static char | m_gszExtHeaderSignat [] |
The signature of the extended header. | |
Protected Member Functions | |
void | EmptyWriteBuffer () |
Flush without writing. | |
bool | OpenFile (LPCTSTR lpszName, UINT uFlags, bool bThrow=true) |
Open a physical file. | |
void | ThrowError (int err) |
Throw an exception with the given code. | |
DWORD | VolumeLeft () const |
Return the number of bytes left on the current volume. | |
CZipString | RenameLastFileInTDSpan () |
Rename last file in TD mode disk spanning archive when done with creating. | |
void | WriteInternalBuffer (const char *pBuf, DWORD uSize) |
Write data to the internal buffer. | |
DWORD | GetFreeVolumeSpace () const |
void | CallCallback (int iCode, CZipString szTemp) |
Notify the callback object. | |
CZipString | GetTdVolumeName (bool bLast, LPCTSTR lpszZipName=NULL) const |
Construct the name of the volume in tdSpan mode. | |
CZipString | ChangeTdRead () |
Change the disk in tdSpan mode. | |
CZipString | ChangePkzipRead () |
Change the disk in pkzipSpan mode. | |
DWORD | GetFreeInBuffer () const |
Protected Attributes | |
int | m_iTdSpanData |
Used only in TD span mode . | |
CZipString | m_szSpanExtension |
The extension of the last volume. | |
DWORD | m_uBytesInWriteBuffer |
Number of bytes available in the write buffer. | |
DWORD | m_uCurrentVolSize |
The value it holds depends on the open mode:. | |
DWORD | m_uVolumeFreeInBuffer |
number of bytes left free in the write buffer | |
CZipAutoBuffer | m_pWriteBuffer |
Write buffer caching data. | |
DWORD | m_iBytesWritten |
Used only during disk spanning archive creation. | |
bool | m_bNewSpan |
True , if the current archive is a new disk spanning archive. | |
int | m_iCurrentDisk |
The current disk in a disk spanning archive. | |
bool | m_bInMemory |
It is set to true when an archive is created in memory; false otherwise. | |
bool | m_bReadOnly |
It is set to true if OpenMode::zipOpenReadOnly was specified when opening the archive. | |
bool | m_bTreatAsSingleDisk |
Is is set by SetTreatAsSingleDisk. | |
Friends | |
class | CZipCentralDir |
Definition at line 202 of file ZipStorage.h.
|
The type of the disk spanning archive.
Definition at line 211 of file ZipStorage.h. |
|
Ensures than in a disk spanning archive, there is enough free space in the current volume.
|
|
Notify the callback object.
Throw an exception if the callback object's method
|
|
Change the disk during extract operations.
|
|
|
|
Flush without writing. Can be used only on non-disk spanning archives. Definition at line 460 of file ZipStorage.h. |
|
Flush the data from the read buffer to the disk.
Referenced by CZipCentralDir::RemoveLastFile(). |
|
Definition at line 360 of file ZipStorage.h. |
|
Definition at line 564 of file ZipStorage.h. |
|
|
|
Definition at line 298 of file ZipStorage.h. |
|
Return the position in the file, taking into account the bytes in the write buffer.
Definition at line 327 of file ZipStorage.h. |
|
Construct the name of the volume in tdSpan mode.
|
|
Definition at line 306 of file ZipStorage.h. |
|
Detect the span mode.
Definition at line 379 of file ZipStorage.h. |
|
A method used to change disks during writing to the disk spanning archive.
|
|
Open or create an archive. The parameters are the same as CZipArchive::Open(LPCTSTR, int, int).
|
|
Open the archive in memory (new or existing). The parameters are the same as CZipArchive::Open(CZipAbstractFile& , int).
|
|
Open a physical file.
|
|
Read chunk of data from the archive.
|
|
If you set bSingleDisk to The purpose of this method is to allow reading archives that have improperly set disk numbers. Definition at line 396 of file ZipStorage.h. |
|
Throw an exception with the given code.
|
|
Called only by CZipCentralDir::Read() when opening an existing archive.
|
|
Write chunk of data to the archive.
|
|
Write data to the internal buffer.
|
|
Used only during disk spanning archive creation. Tells how many bytes have been written physically to the current volume. Definition at line 595 of file ZipStorage.h. |
|
The current disk in a disk spanning archive. Disk no 0 is the first disk. Definition at line 606 of file ZipStorage.h. |
|
The physical archive file (on a storage device). Not used when opening archive in memory with Open(CZipMemFile& , int). Definition at line 426 of file ZipStorage.h. |
|
Used only in TD span mode . The value it holds depends on the open mode.
Definition at line 554 of file ZipStorage.h. |
|
The size of the write buffer. Set before opening the archive. It is usually set with CZipArchive::SetAdvanced (specify this value as the first argument).
Definition at line 418 of file ZipStorage.h. |
|
A callback object which method
Definition at line 449 of file ZipStorage.h. |
|
The buffer representing the archive. It is a physical file or a memory buffer depending on what method was used to open the archive. In the first case it is a pointer to m_internalfile.
Definition at line 437 of file ZipStorage.h. Referenced by CZipCentralDir::RemoveLastFile(). |
|
The value it holds depends on the open mode:.
Definition at line 577 of file ZipStorage.h. |