ZipFile.CreateFromDirectory Method

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a zip archive that contains the files and directories from the specified directory.

Namespace:   System.IO.Compression
Assembly:  System.IO.Compression.FileSystem (in System.IO.Compression.FileSystem.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCreateFromDirectory(String, String)

Creates a zip archive that contains the files and directories from the specified directory.

System_CAPS_pubmethodSystem_CAPS_staticCreateFromDirectory(String, String, CompressionLevel, Boolean)

Creates a zip archive that contains the files and directories from the specified directory, uses the specified compression level, and optionally includes the base directory.

System_CAPS_pubmethodSystem_CAPS_staticCreateFromDirectory(String, String, CompressionLevel, Boolean, Encoding)

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.

Return to top
Show: