public string Site( string command )
Represents FTP SITE command.
Using SendCommand and ReadResponse method might be a better choice in some cases.
Shows how to use Site method to send a site-specific command to an FTP server.
using System; using ComponentPro.Net; ... // Create a new class instance. Ftp client = new Ftp(); // Connect to the FTP server. client.Connect("myserver"); // Authenticate. client.Authenticate("userName", "password"); // ... // Execute SITE HELP command on the server and return a response. // SITE HELP usually returns a list of SITE commands supported by the FTP server. string response = client.Site("HELP"); Console.WriteLine("Response: " + response); // Change access rights to a file on a unix-like FTP server. client.Site("CHMOD 777 file1.txt"); // Get current user's group membership. response = client.Site("GROUPS"); Console.WriteLine(response); // ... // Disconnect. client.Disconnect();