Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from SFtp.ReadDir to SFtp.ReadDirListing
Provides instructions for replacing deprecated ReadDir method calls with ReadDirListing.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oSftp
LOCAL cHandle
LOCAL oDirObj
LOCAL oDirOut
nSuccess := 0
oSftp := CreateObject("Chilkat.SFtp")
// ...
// ...
cHandle := oSftp:OpenDir(".")
// ...
// ...
// ------------------------------------------------------------------------
// The ReadDir method is deprecated:
oDirObj := oSftp:ReadDir(cHandle)
IF (oSftp:LastMethodSuccess == 0)
? oSftp:LastErrorText
oSftp:destroy()
RETURN
ENDIF
// ...
// ...
oDirObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using ReadDirListing.
// Your application creates a new, empty SFtpDir object which is passed
// in the last argument and filled upon success.
oDirOut := CreateObject("Chilkat.SFtpDir")
nSuccess := oSftp:ReadDirListing(cHandle, oDirOut)
IF (nSuccess == 0)
? oSftp:LastErrorText
oSftp:destroy()
oDirOut:destroy()
RETURN
ENDIF
// ...
// ...
oSftp:CloseHandle(cHandle)
oSftp:destroy()
oDirOut:destroy()