public void TestGetDirList(string host, int port, FtpsSecurityProtocol protocol, string user, string pwd, string server) { using (FtpsClient c = new FtpsClient(host, port, protocol)) { c.AlwaysAcceptServerCertificate = true; c.Open(user, pwd); Assert.IsTrue(c.IsConnected); FtpsItemCollection lst = c.GetDirList(); Debug.WriteLine("==================================================="); Debug.WriteLine("DIRECTORY DUMP"); Debug.WriteLine("==================================================="); foreach (FtpsItem item in lst) { Debug.WriteLine(item.RawText); Debug.WriteLine(item.ToString()); } Debug.WriteLine("==================================================="); } }