/// <summary> /// 获取完整的FTP主机格式 /// </summary> /// <returns></returns> public static string GetFtpRoot() { string port = string.Empty; string split = string.Empty; if (!FtpPort.Equals(21)) { split = ":"; port = FtpPort.ToString(); } return(string.Format("ftp://{0}{1}{2}", FtpHost, split, port)); }
public virtual string GetFtpFileTemplatePath(string strFileName) { string path = "ftp://" + FtpHost + ":" + FtpPort.ToString() + "/" + strFileName.TrimStart('/'); return(path); }
public virtual string GetFtpFilepath(string strFileName) { return("ftp://" + FtpHost + ":" + FtpPort.ToString() + "/" + GetFtpBasePath(strFileName)); }