Exemplo n.º 1
0
 public static Tuple <bool, string> SetFtpInfo(string host, string user, string passwd, string remotePath)
 {
     Log.logger.Info("FTP: host={0}, user={1}, passwd={2}, remotePath={3}", host, user, passwd, remotePath);
     if (ftpInfo == null)
     {
         ftpInfo = new FTPInfo(host, user, passwd);
     }
     if (remotePath != null && !remotePath.Equals(""))
     {
         ftpInfo.RemotePath = remotePath;
     }
     return(Results.GetResultsTuple(true));
 }
Exemplo n.º 2
0
 public FTPClient(FTPInfo ftpInfo)
 {
     Credential = new NetworkCredential(ftpInfo.User, ftpInfo.Passwd);
     Base       = "ftp://" + ftpInfo.Host;
 }