Adds an entry to the current zip file.

Namespace:  C1.C1Zip
Assembly:  C1.Silverlight.Zip (in C1.Silverlight.Zip.dll)

Syntax

C#
public void Add(
	string fileName,
	int pathLevels
)
Visual Basic
Public Sub Add ( _
	fileName As String, _
	pathLevels As Integer _
)

Parameters

fileName
Type: System..::..String
Name of the file to add to the zip file.
pathLevels
Type: System..::..Int32
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