Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
 public MyProgressMonitor(string id, ProgressDelegate progress, TransfersEndDelegate end)
 {
     this.id          = id;
     this.progress    = progress;
     this.transferEnd = end;
 }