ZipArchive

Object representing the entire archive. ZipArchives are collections of ArchiveMembers.

final
class ZipArchive {
string comment;
static const
ushort zip64ExtractVersion;
deprecated("Use digitalSignatureLength instead; will be removed in 2.098.0") static const
int digiSignLength;
deprecated("Use zip64EndOfCentralDirLocatorLength instead; will be removed in 2.098.0") static const
int eocd64LocLength;
deprecated("Use zip64EndOfCentralDirLength instead; will be removed in 2.098.0") static const
int eocd64Length;
}

Constructors

this
this()

Constructor to use when creating a new archive.

this
this(void[] buffer)

Constructor to use when reading an existing archive.

Members

Functions

addMember
void addMember(ArchiveMember de)

Add a member to the archive. The file is compressed on the fly.

build
void[] build()

Construct the entire contents of the current members of the archive.

deleteMember
void deleteMember(ArchiveMember de)

Delete member de from the archive. Uses the name of the member to detect which element to delete.

expand
ubyte[] expand(ArchiveMember de)

Decompress the contents of a member.

Properties

data
ubyte[] data [@property getter]

Array representing the entire contents of the archive.

directory
ArchiveMember[string] directory [@property getter]

Associative array indexed by the name of each member of the archive.

diskNumber
uint diskNumber [@property getter]

0 since multi-disk zip archives are not supported.

diskStartDir
uint diskStartDir [@property getter]

0 since multi-disk zip archives are not supported.

isZip64
bool isZip64 [@property getter]
bool isZip64 [@property setter]

True when the archive is in Zip64 format. Set this to true to force building a Zip64 archive.

numEntries
uint numEntries [@property getter]

Number of ArchiveMembers in the directory.

Meta

Suggestion Box / Bug Report