ComponentOne Zip for .NET
Add(String,Int32) Method

C1.C1Zip.4 Assembly > C1.C1Zip Namespace > C1ZipEntryCollection Class > Add Method : Add(String,Int32) Method
Name of the file to add to the zip file.
The number of path levels to be stored as the entry name.
Adds an entry to the current zip file.
Syntax
Public Overloads Sub Add( _
   ByVal fileName As String, _
   ByVal pathLevels As Integer _
) 
public void Add( 
   string fileName,
   int pathLevels
)

Parameters

fileName
Name of the file to add to the zip file.
pathLevels
The number of path levels to be stored as the entry name.
Remarks

By default, path names are not stored in the zip file. For example, adding the file "c:\temp\samples\readme.txt" to the zip file will create an entry called "readme.txt".

The pathLevels parameter allows you to store one or more levels of the path in the entry name. For example, adding the file "c:\temp\samples\readme.txt" to the zip file with pathLevels=1 will create an entry called "samples\readme.txt".

See Also

Reference

C1ZipEntryCollection Class
C1ZipEntryCollection Members
Overload List