public void TestGetFileInfo(string host, int port, FtpsSecurityProtocol protocol,
     string user, string pwd, ListingMethod method)
 {
     using (FtpsClient c = new FtpsClient(host, port, protocol))
     {
         Debug.WriteLine("********** BEGINNING **********");
         c.AlwaysAcceptServerCertificate = true;
         c.DirListingMethod = method;
         c.Open(user, pwd);
         Assert.IsTrue(c.IsConnected);
         // get information about the root directory
         FtpsItem m = c.GetFileInfo(".");
         if (m is FtpsMlsxItem)
             Debug.Write(((FtpsMlsxItem)m).ToString());
         else
             Debug.Write(m.ToString());
         Debug.WriteLine("********** ENDING **********");
     }
 }
Beispiel #2
0
 public void TestGetFileInfo(string host, int port, FtpSecurityProtocol protocol,
                             string user, string pwd, ListingMethod method)
 {
     using (FtpClient c = new FtpClient(host, port, protocol))
     {
         Debug.WriteLine("********** BEGINNING **********");
         c.AlwaysAcceptServerCertificate = true;
         c.DirListingMethod = method;
         c.Open(user, pwd);
         Assert.IsTrue(c.IsConnected);
         // get information about the root directory
         FtpItem m = c.GetFileInfo(".");
         if (m is FtpMlsxItem)
         {
             Debug.Write(((FtpMlsxItem)m).ToString());
         }
         else
         {
             Debug.Write(m.ToString());
         }
         Debug.WriteLine("********** ENDING **********");
     }
 }