示例#1
0
文件: Sftp.cs 项目: jorgevr/Borawind
        public void MoveFtpProcessedFile(string filePath, string processedFilesFtpFolder, string processedFileTextToAppend)
        {
            var movedFile = processedFilesFtpFolder + filePath.Split('/').Last() + processedFileTextToAppend;
            _logger.InfoFormat("Moving file {0} to {1}", filePath, movedFile);
            var client = new FtpClient(new FtpInfo(_ftpInfo.Address, _ftpInfo.UserName, _ftpInfo.PassWord));
            client.MoveFtpProcessedFile(filePath, processedFilesFtpFolder, processedFileTextToAppend);

            //var client = new SftpClient(getHost(_ftpInfo.Address), _ftpInfo.UserName, _ftpInfo.PassWord);
            //client.Connect();
            //client.RenameFile(filePath, movedFile);
            //client.Disconnect();
        }