コード例 #1
0
        public SftpProgressMonitor TransfersToLocal(string id, string localPath, string remotePath, int mode, ProgressDelegate progress, TransfersEndDelegate end)
        {
            SftpProgressMonitor monitor = new MyProgressMonitor(id, progress, end);

            try
            {
                sftpChannel.get(remotePath, localPath, monitor, mode);
            }
            catch { }
            return(monitor);
        }
コード例 #2
0
        public SftpProgressMonitor TransfersToRemote(string id, string localPath, string remotePath, int mode, ProgressDelegate progress, TransfersEndDelegate end)
        {
            SftpProgressMonitor monitor = new MyProgressMonitor(id, progress, end);

            try
            {
                sftpChannel.put(localPath, remotePath, monitor, mode);
            }
            catch (Exception e) {
                Console.WriteLine(localPath + "================>" + remotePath);
                logger.Error("put文件到服务器异常:" + e.Message, e);
            }
            return(monitor);
        }