Sorts a enumeration of
CopyC#
FtpFile
. The user have to specify a comparator instance which will be used by the sort algorithm. The sort is made by default in ascendent way, however, you can change that property. The sort can be made by file name, date or size too. To change the sorter field it is necessary to specify the corresponding comparator.

Examples

The following is an example usage:
CopyC#
Ftp ftp = new Ftp("ftp.myserver.com","anonymous","user@here.com");
ftp.Connect();

// Get the remote files enumeration
IEnumerator e = ftp.GetDirListing();

//Creates the sorter
FtpFileSort sort = new FtpFileSort(e);

// Ascendent way
sort.Ascendent = true;

// Sortes the enumeration data
e = sort.Sort(FtpFileSort.Comparator.date);

Namespace: Jscape.Ftp
Assembly: Jscape.Ftp (in Jscape.Ftp.dll) Version: 2.4.5.0

Syntax

C#
public class FtpFileSort
Visual Basic
Public Class FtpFileSort
Visual C++
public ref class FtpFileSort

Inheritance Hierarchy

System..::..Object
  Jscape.Ftp..::..FtpFileSort

See Also