ComponentOne Zip for .NET 2.0
C1.Zip Assembly / C1.Zip 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.

In This Topic
    Add(String,Int32) Method
    In This Topic
    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