![]() The extension method ExtractToFile for the ZipArchiveEntry object is available in the System.IO.Compression.ZipFileExtensions class. zip file, and the ZipArchiveEntry class to inspect the individual entries. It uses the ZipArchive class to access the. The following example iterates through the contents of an existing. ZipFile.ExtractToDirectory(zipPath, extractPath)Įxample 2: Extract specific file extensions ZipFile.CreateFromDirectory(startPath, zipPath) ZipFile.ExtractToDirectory(zipPath, extractPath) String startPath = zipPath = extractPath = zipPath) To run the sample, create a start folder in your program folder and populate it with files to zip. zip file, and then extracts the file to a new folder. The example compresses the contents of a folder into a new. ![]() ![]() The following example shows how to create and extract a compressed. NET Framework, add references to these two libraries to your project:Įxample 1: Create and extract a. These examples require the following NuGet packages to be added to your project: The following examples show some of the operations you can perform with compressed files. You also can use these types to read and modify the contents of a compressed file: ![]() The System.IO.Compression namespace contains the following classes for compressing and decompressing files and streams.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |