/// <summary> /// 生成目录 /// </summary> /// <param name="book"></param> public string UploadIndexFile(TygModel.书名表 book) { string dirserver = string.Format(createDirUrl, System.IO.Path.GetDirectoryName("/" + book.GetHTMLFilePath())); //创建目录 string dic = GetWebDic(dirserver); //生成目录成功 if (!string.IsNullOrEmpty(dic)) { //生成没有成功 //移动当前工作目录 ftp.GotoDirectory(BaseFtpDic + Book.GetHTMLFilePath().Replace("/index.html", string.Empty), true); string dirindex = BaseWebSite + "HTML/" + Book.分类标识.Trim().ToPingYing() + "/" + Book.书名.Trim().ToPingYing() + "/index.html"; //ftp上传文件 if (Upload(dirindex)) { System.Console.WriteLine(string.Format("FTP {0},生成目录---------完成", Book.书名)); } } return(dic); }