![]() |
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
(Visual FoxPro) Transition from SFtp.ReadDir to SFtp.ReadDirListingProvides instructions for replacing deprecated ReadDir method calls with ReadDirListing. Note: This example requires Chilkat v11.0.0 or greater.
LOCAL lnSuccess LOCAL loSftp LOCAL lcHandle LOCAL loDirObj LOCAL loDirOut lnSuccess = 0 loSftp = CreateObject('Chilkat.SFtp') * ... * ... lcHandle = loSftp.OpenDir(".") * ... * ... * ------------------------------------------------------------------------ * The ReadDir method is deprecated: loDirObj = loSftp.ReadDir(lcHandle) IF (loSftp.LastMethodSuccess = 0) THEN ? loSftp.LastErrorText RELEASE loSftp CANCEL ENDIF * ... * ... RELEASE loDirObj * ------------------------------------------------------------------------ * Do the equivalent using ReadDirListing. * Your application creates a new, empty SFtpDir object which is passed * in the last argument and filled upon success. loDirOut = CreateObject('Chilkat.SFtpDir') lnSuccess = loSftp.ReadDirListing(lcHandle,loDirOut) IF (lnSuccess = 0) THEN ? loSftp.LastErrorText RELEASE loSftp RELEASE loDirOut CANCEL ENDIF * ... * ... loSftp.CloseHandle(lcHandle) RELEASE loSftp RELEASE loDirOut |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.