PowerTCP FTP for .NET
ListEntry Class
Members  Example 



Represents each line of the textual listing received from an FTP server.
Syntax
Public Class ListEntry 
Dim instance As ListEntry
public class ListEntry 
public ref class ListEntry 
Remarks

To access a field that is not represented in the ListEntry object, manually parse the Text property.

Example
This example demonstrates using the FTP control to obtain a directory listing from a remote server.
private void getListing()
{
    //Connect and log into the server, and get a listing
    ftp1.Connect(myServer);
    ftp1.Authenticate(myUsername, myPassword);
    Listing listing = ftp1.List("", "", ListType.Full);

    //Add all the list entries in the listing to a listbox
    foreach (ListEntry entry in listing)
        listBox1.Items.Add(entry.Text);

    //Logout of the server
    ftp1.Close();
}
Private Sub getListing()
    'Connect and log into the server, and get a listing
    ftp1.Connect(myServer)
    ftp1.Authenticate(myUsername, myPassword)
    Dim listing As Listing = ftp1.List("", "", ListType.Full)

    'Add all the list entries in the listing to a listbox
    For Each entry As ListEntry In listing
        listBox1.Items.Add(entry.Text)
    Next entry

    'Logout of the server
    ftp1.Close()
End Sub
Inheritance Hierarchy

System.Object
   Dart.Ftp.ListEntry

See Also

Reference

ListEntry Members
Dart.Ftp Namespace


PowerTCP FTP for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic