Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim FTP As FTP
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("up")
Activity.Title="HOME"
If FirstTime Then
FTP.Initialize("FTP","172.17.1.71",21,"ftpuser","ftp123")
FTP.List("/")
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub FTP_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
Log(ServerPath)
If Success = False Then
Log(LastException)
Else
For i = 0 To Folders.Length - 1
Log(Folders(i).Name)
Next
For i = 0 To Files.Length - 1
Log(Files(i).Name & ", " & Files(i).Size & ", " & DateTime.Date(Files(i).Timestamp))
Next
End If
End Sub