Copyright © 2006-2019 MultiMedia Soft

ZIP.EntryAdd method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds one or more file entries to a ZIP file session previously opened through the ZIP.Open method or created through the ZIP.Create method.

 

This method only updates the ZIP session: to update or rewrite the ZIP file the ZIP.Save method would need to be called.

 

A successful call to this method will fire the ZipOperationStart event followed by a number of ZipOperationPerc events and finally by the ZipOperationDone event.

 

For further details about methods for ZIP management refer to the ZipMan class.

For details about using ZIP management refer to the How to manage ZIP files tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function EntryAdd (

strSourcePath as String,

bRecurseDirs as Boolean,

bAddExtraPath as Boolean

) as enumErrorCodes


 

[C#]

public enumErrorCodes EntryAdd (

string strSourcePath,

bool bRecurseDirs,

bool bAddExtraPath

);


 

[C++]

public: enumErrorCodes EntryAdd (

string strSourcePath,

bool bRecurseDirs,

bool bAddExtraPath

);


 

 

Parameter

Description

 

 

strSourcePath

String representing the absolute pathname of the file(s) or folder to add to the ZIP file.

It's allowed using the "*" and "?" wildcard characters where "*" means 0 or more of any character and "?" means any single character.

bRecurseDirs

Boolean flag determining if eventual sub-directories of the given path should be traversed and added to the directory tree.

Supported values are the following:

Value

Meaning

false

Eventual sub-directories are not traversed

true

Eventual sub-directories are traversed and contained files are added to the ZIP session

bAddExtraPath

Boolean flag determining if absolute path will be included in the zip entry filenames as relative paths.

Supported values are the following:

Value

Meaning

false

The relative path of each zipped file is not added to the final entry name.

true

The relative path of each zipped file is added to the final entry name.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred. Check the LastError property value in order to see the last error.

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.