Sample code for 30+ languages & platforms
Lianja

Transition from Zip.FirstMatchingEntry to Zip.EntryMatching

Provides instructions for replacing deprecated FirstMatchingEntry method calls with EntryMatching.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loZip = createobject("CkZip")

// ...
// ...
lcPattern = "*.txt"

// ------------------------------------------------------------------------
// The FirstMatchingEntry method is deprecated:

loEntryObj = loZip.FirstMatchingEntry(lcPattern)
if (loZip.LastMethodSuccess = .F.) then
    ? loZip.LastErrorText
    release loZip
    return
endif

// ...
// ...

release loEntryObj

// ------------------------------------------------------------------------
// Do the equivalent using EntryMatching.
// Your application creates a new, empty ZipEntry object which is passed 
// in the last argument and filled upon success.

loZe = createobject("CkZipEntry")
llSuccess = loZip.EntryMatching(lcPattern,loZe)
if (llSuccess = .F.) then
    ? loZip.LastErrorText
    release loZip
    release loZe
    return
endif



release loZip
release loZe