![]() |
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
(Lianja) 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.
// ------------------------------------------------------------------------ // The NextEntry method is deprecated. // See below or code showing how to rewrite using EntryAt/GetNext loZip = createobject("CkZip") llSuccess = loZip.OpenZip("qa_data/zips/xml_files.zip") if (llSuccess <> .T.) then ? loZip.LastErrorText release loZip return endif loEntry = loZip.FirstEntry() if (loZip.LastMethodSuccess = .F.) then ? "This zip archive is empty." release loZip return endif llFinished = .F. do while llFinished = .F. if (loEntry.IsDirectory = .F.) then ? loEntry.FileName else ? "(directory) " + loEntry.FileName endif loNext = loEntry.NextEntry() if (loEntry.LastMethodSuccess = .F.) then llFinished = .T. endif release loEntry loEntry = loNext enddo loZip.CloseZip() ? "----" // ------------------------------------------------------------------------ // Do the equivalent using EntryAt/GetNext. llSuccess = loZip.OpenZip("qa_data/zips/xml_files.zip") loZe = createobject("CkZipEntry") loZip.EntryAt(0,loZe) llEntryValid = .T. do while llEntryValid = .T. if (loZe.IsDirectory = .F.) then ? loZe.FileName else ? "(directory) " + loZe.FileName endif llEntryValid = loZe.GetNext() enddo loZip.CloseZip() release loZip release loZe |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.