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 **********"); } }