网络进入创建文件夹
/// <summary> /// 创建 文件夹 /// </summary> /// <param name="dirName"></param>
public void MakeDir(string dirName) { HttpWebRequest reqHTTP; FtpWebRequest reqFTP; try { // dirName = name of the directory to create.
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpURI + dirName));
reqFTP.Method = WebRequestMethods.Ftp.MakeDirectory;
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);
FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
Stream ftpStream = response.GetResponseStream();
ftpStream.Close();
response.Close();
}
catch (Exception ex) {
} }