CreateZipFile(DirectoryInfo, FileInfo, CompressionLevel, bool, Encoding) Method

Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression level and character encoding for entry names, and optionally includes the base directory.
Namespace: Z.Compression.Extensions
Assembly: Z.ExtensionMethods.WithNamespace.dll

Syntax

public static Void CreateZipFile(this DirectoryInfo this, FileInfo destinationArchiveFile, CompressionLevel compressionLevel, bool includeBaseDirectory, Encoding entryNameEncoding)

Parameters

this
Type:  DirectoryInfo
The path to the directory to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
destinationArchiveFile
Type:  FileInfo
The path of the archive to be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
compressionLevel
One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry.
includeBaseDirectory
Type:  Boolean
true to include the directory name from sourceDirectoryName at the root of the archive; false to include only the contents of the directory.
entryNameEncoding
Type:  Encoding
The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.

Return Value

Type:  Void
Powered by ZZZ Projects .NET Documentation Generator 0.0.2 (Alpha)