![]() |
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 SFtp.ReadDir to SFtp.ReadDirListingProvides instructions for replacing deprecated ReadDir method calls with ReadDirListing. Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll set success 0 set sftp [new_CkSFtp] # ... # ... set handle [CkSFtp_openDir $sftp "."] # ... # ... # ------------------------------------------------------------------------ # The ReadDir method is deprecated: # dirObj is a CkSFtpDir set dirObj [CkSFtp_ReadDir $sftp $handle] if {[CkSFtp_get_LastMethodSuccess $sftp] == 0} then { puts [CkSFtp_lastErrorText $sftp] delete_CkSFtp $sftp exit } # ... # ... delete_CkSFtpDir $dirObj # ------------------------------------------------------------------------ # Do the equivalent using ReadDirListing. # Your application creates a new, empty SFtpDir object which is passed # in the last argument and filled upon success. set dirOut [new_CkSFtpDir] set success [CkSFtp_ReadDirListing $sftp $handle $dirOut] if {$success == 0} then { puts [CkSFtp_lastErrorText $sftp] delete_CkSFtp $sftp delete_CkSFtpDir $dirOut exit } # ... # ... CkSFtp_CloseHandle $sftp $handle delete_CkSFtp $sftp delete_CkSFtpDir $dirOut |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.