コード例 #1
0
 public HistoricalOutput(string Name, string Type, string Directory, FTP Ftp)
 {
     this.Name      = Name;
     this.FTPType   = (FTPType)Enum.Parse(typeof(FTPType), Type, true);
     this.Directory = Directory;
     this.Ftp       = Ftp;
 }
コード例 #2
0
        public byte[] DownloadFile(FTPType fTPType, string ftpUrl, string savePath, string userName = "", string password = "")
        {
            switch (fTPType)
            {
            case FTPType.USING_WEBCLIENT:
                return(downloadWithWEB(ftpUrl, savePath, userName, password));

            default:
            case FTPType.USING_FTP:
                return(downloadWithFTP(ftpUrl, savePath, userName, password));
            }
        }
コード例 #3
0
ファイル: FTPHelper.cs プロジェクト: franknew/SOAFramework
        public static IFTPClient CreateInstance(string ip, int port, string path, string username, string password, FTPType type)
        {
            IFTPClient client;

            switch (type)
            {
            case FTPType.SFTP:
                client = new SFTPClient(ip, port, path, username, password);
                break;

            default:
                client = new FTPClient(ip, port, path, username, password);
                break;
            }
            return(client);
        }