Sub FTP_ListCompleted(ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
' NetExtras(version: 1.52) is not compatible with Net(version: 1.53)
' java.lang.exception ftp_listcompleted signature not match expected signature
' Csr.LogMemory1(" FTP_ListCompleted: Traza 1", "3")
Log(ServerPath)
If Success = True Then
' Csr.LogMemory1(" FTP_ListCompleted: Traza 2", "3")
For i = 0 To Files.Length - 1
' Csr.LogMemory1(" FTP_ListCompleted: Traza 3", "3")
If (Files.Length - 1) > NroMaxFiles AND _
(Files.Length - NroMaxFiles - i) > 0 AND _
Files(i).Name.Contains("cocogasdta") Then
Try
FTP1.DeleteFile(DirFtp & Files(i).Name)
Log("*D*" & Files(i).Name)
Csr.LogMemory1(" FTP_ListCompleted: " & "*D*" & Files(i).Name, "3")
Catch
Csr.LogMemory1(" FTP_ListCompletedErr: " & Files(i).Name, "3")
If LastException.IsInitialized Then
Csr.LogMemory(Activity, "LastException. " & LastException, "3")
Csr.LogMemory(Activity, "LastException.Message " & LastException.Message, "3")
Else
End If
End Try
Else
' Csr.LogMemory1(" FTP_ListCompleted: Traza 4", "3")
Log(Files(i).Name)
Csr.LogMemory1(" FTP_ListCompleted: " & Files(i).Name, "3")
End If
Next
Csr.LogMemory1(" FTP_ListCompleted: NroMax & DirFtp:: " & NroMaxFiles & " " & DirFtp, "3")
X02_SendFtpBBDD(Main.DirTmp)
Else
If LastException.IsInitialized Then
'Other IP::: android.system.ErrnoException: connect failed: EHOSTUNREACH (No route to host)
'Other Pto:: android.system.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
'FromInToOut:: java.io.IOException: Host attempting data connection 192.168.1.114 is not same as server xxx.xxx.54.35
Log(LastException.Message)
X55_SndMyFtpSale(" FTP_ListCompletedErr " & LastException.Message)
Else
X55_SndMyFtpSale(" FTP_ListCompletedErr NoControlado")
End If
End If
End Sub