![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(PowerShell) Transition from ZipEntry.NextEntry to ZipEntry.GetNextProvides instructions for replacing deprecated NextEntry method calls with GetNext. Note: This example requires Chilkat v11.0.0 or greater.
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll" # ------------------------------------------------------------------------ # The NextEntry method is deprecated. # See below or code showing how to rewrite using EntryAt/GetNext $zip = New-Object Chilkat.Zip $success = $zip.OpenZip("qa_data/zips/xml_files.zip") if ($success -ne $true) { $($zip.LastErrorText) exit } $entry = $zip.FirstEntry() if ($zip.LastMethodSuccess -eq $false) { $("This zip archive is empty.") exit } $finished = $false while ($finished -eq $false) { if ($entry.IsDirectory -eq $false) { $($entry.FileName) } else { $("(directory) " + $entry.FileName) } $next = $entry.NextEntry() if ($entry.LastMethodSuccess -eq $false) { $finished = $true } $entry = $next } $zip.CloseZip() $("----") # ------------------------------------------------------------------------ # Do the equivalent using EntryAt/GetNext. $success = $zip.OpenZip("qa_data/zips/xml_files.zip") $ze = New-Object Chilkat.ZipEntry $zip.EntryAt(0,$ze) $entryValid = $true while ($entryValid -eq $true) { if ($ze.IsDirectory -eq $false) { $($ze.FileName) } else { $("(directory) " + $ze.FileName) } $entryValid = $ze.GetNext() } $zip.CloseZip() |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.