PowerTCP FTP for .NET
Listing Class
Members  Example 



Represents the textual listing received from an FTP server.
Object Model
Listing ClassListEntry Class
Syntax
Remarks

This object encapsulates the listing returned from Ftp.List and cotains a collection of ListEntry objects (representing individual list entries, such as a file).

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
   System.Collections.Generic.List<T>
      Dart.Ftp.Listing

See Also

Reference

Listing Members
Dart.Ftp Namespace


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