示例#1
0
文件: Sftp.cs 项目: jorgevr/Borawind
        public IList<string> ReadLinesFromFtpFile(string file)
        {
            var result = new List<string>();

            var client = new FtpClient(new FtpInfo(_ftpInfo.Address, _ftpInfo.UserName, _ftpInfo.PassWord));
            result = client.ReadLinesFromFtpFile(file).ToList();

            //var client = new SftpClient(getHost(_ftpInfo.Address), _ftpInfo.UserName, _ftpInfo.PassWord);
            //client.Connect();
            //result = client.ReadAllLines(file).ToList();
            //client.Disconnect();
            return result;
        }