Android Programming Press on the image to return to the main documentation page.

FTP

List of types:

FTP
FTPEntry

FTP

FTP allows you to communicate with FTP servers.
See FTP tutorial for more information.

Permissions:

android.permission.INTERNET

Events:

DownloadCompleted (ServerPath As String, Success As Boolean)
DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
UploadCompleted (ServerPath As String, Success As Boolean)
UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
DeleteCompleted (ServerPath As String, Success As Boolean)
ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)

Members:


  Close

  CloseNow

  DeleteFile (ServerPath As String)

  DownloadFile (ServerFilePath As String, AsciiFile As Boolean, DeviceFolder As String, DeviceFile As String)

  Initialize (EventName As String, Host As String, Port As Int, User As String, Password As String)

  IsInitialized As Boolean

  List (ServerPath As String)

  UploadFile (DeviceFolder As String, DeviceFile As String, AsciiFile As Boolean, ServerFilePath As String)

Members description:

Close
Closes the connection after all submitted tasks finish. Note that this method do not block.
CloseNow
Closes the connection immediately without waiting for current tasks to finish.
DeleteFile (ServerPath As String)
Deletes a file from the server.
The DeleteCompleted event will be raised when this task completes.
DownloadFile (ServerFilePath As String, AsciiFile As Boolean, DeviceFolder As String, DeviceFile As String)
Downloads a file from the server. The DownloadCompleted event will be raised when download completes.
DownloadProgress events will be raised during download.
ServerFilePath - Full path to the remote file.
AsciiFile - If True then end of line characters will be converted as needed. Note that Android end of line character is the same as Unix / Linux.
DeviceFolder - Folder that the file will be saved to.
DeviceFile - The name of the local file that will be created.
Initialize (EventName As String, Host As String, Port As Int, User As String, Password As String)
Initializes the object and sets the subs that will handle the events
IsInitialized As Boolean
Tests whether the object was initialized.
List (ServerPath As String)
Fetches the list of folders and files in the specified path.
The ListCompleted event will be raised when the data is available.
UploadFile (DeviceFolder As String, DeviceFile As String, AsciiFile As Boolean, ServerFilePath As String)
Uploads a file to the server. The UploadCompleted event will be raised when upload completes.
UploadProgress events will be raised during the upload.
DeviceFolder - Local folder.
DeviceFile - Local file name.
AsciiFile - If True then end of line characters will be converted as needed. Note that Android end of line character is the same as Unix / Linux.
ServerFilePath - Full path to file that will be created on the server.

FTPEntry

FTPEntry represents a file or a folder. Call FTP.List to get the files and folders.

Events:

None

Members:


  IsInitialized As Boolean

  Name As String [read only]

  Size As Long [read only]

  Timestamp As Long [read only]

Members description:

IsInitialized As Boolean
Name As String [read only]
Size As Long [read only]
Timestamp As Long [read only]

Top