public override FileInfoBase GetItemInfo( string path )
Shows how to use GetItemInfo method to retrieve information of a file on an FTP server.
using System; using ComponentPro.Net; ... // Create a new class instance. Ftp client = new Ftp(); // Connect to the FTP server. client.Connect("localhost"); // Authenticate. client.Authenticate("test", "test"); // ... // Get information of remote file '/test.dat'. FtpFileInfo info = (FtpFileInfo)client.GetItemInfo("/test.dat"); Console.WriteLine("Name: {0}, FullName: {1}, Permissions: {2}", info.Name, info.FullName, info.Permissions); // ... // Disconnect. client.Disconnect();