Ejemplo n.º 1
0
        public CFtp2(string Url, FtpServerType ServerType, bool UsePassive)
        {
            Uri u = new Uri(Url);

            CFtpInfo finfo = new CFtpInfo();

            finfo.ServerType = ServerType;
            finfo.UsePassive = UsePassive;

            finfo.Host = u.Host;
            finfo.Port = u.Port;

            if (!string.IsNullOrEmpty(u.UserInfo))
            {
                string[] aUserPwd = u.UserInfo.Split(':');
                finfo.UserId = aUserPwd[0];

                if (aUserPwd.Length > 1)
                {
                    finfo.Password = aUserPwd[1];
                }
            }

            _Info = finfo;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 생성자
 /// </summary>
 /// <param name="UsePassive">Passive 모드 적용 여부</param>
 /// <param name="Url">FTP 주소</param>
 /// <param name="Port">포트(0이면 FTP 기본 포트인 21번 포트가 사용됨.)</param>
 /// <param name="UserId">사용자 아이디</param>
 /// <param name="Password">비밀번호</param>
 public CFtp2(CFtpInfo Info)
 {
     _Info = Info;
 }