![]() |
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
(Tcl) 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.
load ./chilkat.dll # ------------------------------------------------------------------------ # The NextEntry method is deprecated. # See below or code showing how to rewrite using EntryAt/GetNext set zip [new_CkZip] set success [CkZip_OpenZip $zip "qa_data/zips/xml_files.zip"] if {$success != 1} then { puts [CkZip_lastErrorText $zip] delete_CkZip $zip exit } # entry is a CkZipEntry set entry [CkZip_FirstEntry $zip] if {[CkZip_get_LastMethodSuccess $zip] == 0} then { puts "This zip archive is empty." delete_CkZip $zip exit } set finished 0 while {$finished == 0} { if {[CkZipEntry_get_IsDirectory $entry] == 0} then { puts [CkZipEntry_fileName $entry] } else { puts "(directory) [CkZipEntry_fileName $entry]" } # next is a CkZipEntry set next [CkZipEntry_NextEntry $entry] if {[CkZipEntry_get_LastMethodSuccess $entry] == 0} then { set finished 1 } delete_CkZipEntry $entry set entry $next } CkZip_CloseZip $zip puts "----" # ------------------------------------------------------------------------ # Do the equivalent using EntryAt/GetNext. set success [CkZip_OpenZip $zip "qa_data/zips/xml_files.zip"] set ze [new_CkZipEntry] CkZip_EntryAt $zip 0 $ze set entryValid 1 while {$entryValid == 1} { if {[CkZipEntry_get_IsDirectory $ze] == 0} then { puts [CkZipEntry_fileName $ze] } else { puts "(directory) [CkZipEntry_fileName $ze]" } set entryValid [CkZipEntry_GetNext $ze] } CkZip_CloseZip $zip delete_CkZip $zip delete_CkZipEntry $ze |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.