예제 #1
0
파일: SharpFTP.cs 프로젝트: arishu/libutils
 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));
 }
예제 #2
0
 public FTPClient(FTPInfo ftpInfo)
 {
     Credential = new NetworkCredential(ftpInfo.User, ftpInfo.Passwd);
     Base       = "ftp://" + ftpInfo.Host;
 }