C# ZipArchive Mode

Description

ZipArchive Mode Gets a value that describes the type of action the zip archive can perform on entries.

Syntax

ZipArchive.Mode has the following syntax.


public ZipArchiveMode Mode { get; }

Example


using System;//from   ww  w  . jav  a2  s. co  m
using System.IO;
using System.IO.Compression;

class Program
{
    static void Main(string[] args)
    {
        string zipPath = @"c:\example\start.zip";
        string extractPath = @"c:\example\extract";

        using (ZipArchive archive = ZipFile.OpenRead(zipPath))
        {
            foreach (ZipArchiveEntry entry in archive.Entries)
            {
                Console.WriteLine(entry.Mode);
            }
        } 
    }
}




















Home »
  C# Tutorial »
    System.IO.Compression »




DeflateStream
GZipStream
ZipArchive
ZipArchiveEntry
ZipFile
ZipFileExtensions